Problem
When a session is processing a long-running exec task (e.g. browser automation for a Whole Foods grocery order via Camoufox), internal exec completion events are delivered as [Queued messages while agent was busy] into the same chat session. The model treats these as new user input, abandoning the active task mid-flow and responding to machine-generated noise instead of continuing the workflow.
Reproduction
- Trigger a workflow involving multiple sequential
exec + process poll calls (e.g. grocery order via browser automation — grocery search, grocery add, grocery cart, etc.)
- While the session is processing, the user sends a reply (normal: answering a question the agent asked mid-flow)
- The agent continues the workflow, generating more
exec completions
- When the model finishes a tool loop, it receives the exec completion dumps in the
[Queued messages while agent was busy] block as if they were user messages
- Model context shifts — it abandons the workflow and starts responding to the internal
System: Exec completed ... events
Expected
Exec completion events should land as tool results in the session context — not as queued user messages. Internal system events should never appear in the [Queued messages while agent was busy] block alongside real user chat.
Actual
The queued messages block contains entries like:
System: [2026-04-06 11:04:45 EDT] Exec completed (gentle-g, code 0) :: 42k/272k (15%) ...
System: [2026-04-06 11:05:43 EDT] Exec failed (grand-la, signal SIGKILL)
System: [2026-04-06 11:09:20 EDT] Exec completed (lucky-ca, code 0) :: [grocery search results JSON] ...
The model receives all of these as user input on the next turn, causing context corruption.
Real-world impact
- User said "grocery run," agent asked one clarifying question, user answered, agent continued
- Underlying grocery order did complete (credit card charged, items ordered) — but agent never sent a completion message
- User had no idea the order placed until the delivery notification
- Agent session ended in a confused state responding to exec output instead of the workflow
Environment
- OpenClaw: 2026.4.5
- Model: openai-codex/gpt-5.4 (codex alias)
- Channel: Discord group channel (requireMention: false)
- Task: long-running browser automation (Camoufox + Python scripts, 10+ sequential exec calls over ~12 minutes)
Workaround
Use message tool explicitly for all user-visible updates during long exec chains, rather than relying on chat reply. Reduces blast radius but doesn't prevent context corruption.
Related
Notes
This may be model-specific — we only started seeing it after upgrading to GPT-5.4 (codex), though the upgrade coincided with OpenClaw 2026.4.5. Unclear whether it's a model behavior change or a platform routing change in 4.5.
Problem
When a session is processing a long-running
exectask (e.g. browser automation for a Whole Foods grocery order via Camoufox), internal exec completion events are delivered as[Queued messages while agent was busy]into the same chat session. The model treats these as new user input, abandoning the active task mid-flow and responding to machine-generated noise instead of continuing the workflow.Reproduction
exec+process pollcalls (e.g. grocery order via browser automation —grocery search,grocery add,grocery cart, etc.)execcompletions[Queued messages while agent was busy]block as if they were user messagesSystem: Exec completed ...eventsExpected
Exec completion events should land as tool results in the session context — not as queued user messages. Internal system events should never appear in the
[Queued messages while agent was busy]block alongside real user chat.Actual
The queued messages block contains entries like:
The model receives all of these as user input on the next turn, causing context corruption.
Real-world impact
Environment
Workaround
Use
messagetool explicitly for all user-visible updates during long exec chains, rather than relying on chat reply. Reduces blast radius but doesn't prevent context corruption.Related
Notes
This may be model-specific — we only started seeing it after upgrading to GPT-5.4 (codex), though the upgrade coincided with OpenClaw 2026.4.5. Unclear whether it's a model behavior change or a platform routing change in 4.5.