Summary
When an agent turn contains multiple tool calls (text → toolCall → toolResult → text → ...), the final text segment after the last tool result is silently dropped. It is neither rendered in WebChat nor injected into the next turn's context.
Impact
Workflow paralysis. The agent cannot see its own previous reply, so it repeats work or skips conclusions. User also cannot see the missing content. Multiple occurrences in one session rendered the workflow inoperable, forcing a version rollback.
Environment
- Version: v2026.5.2 (8b2a6e5) — primary occurrence; also suspected on v2026.4.29
- Node: v24.14.0
- Host: WSL2 Linux 6.6.87, 15GB RAM
- Gateway: ws://127.0.0.1:18789, bind=loopback
- Client: Control UI WebChat (Chrome 147, Windows 11)
Symptoms
- Agent enters multi-step tool chain (text + toolCall → toolResult → text + toolCall → ...)
- After the last tool result, agent generates final analysis text
- This final text segment is silently dropped: not in UI, not in next-turn context
- Agent in next turn cannot see its own output — workflow breaks
- Also observed: WebSocket disconnect during tool chain causes session split (new session ID), and tool-chain continuation writes to the new session
Gateway Log Evidence
11:24:02 long-running session age=294s queued_behind_active_work
11:24:17 toolResult written to session JSONL
11:24:31 long-running session age=322s queued_behind_active_work
11:24:54 webchat disconnected code=1001 → webchat reconnected
11:25:18 next user message (agent had not produced follow-up text)
Session JSONL Evidence
After the tool call and its result, the expected assistant follow-up message is absent:
{"type":"message","message":{"role":"assistant","content":[
{"type":"thinking",...},
{"type":"text","text":"initial analysis..."},
{"type":"toolCall",...}
]}}
{"type":"message","message":{"role":"toolResult",...}}
// Expected: another assistant message with final text
// Actual: next entry is a user message — final text never written
Notes
Summary
When an agent turn contains multiple tool calls (text → toolCall → toolResult → text → ...), the final text segment after the last tool result is silently dropped. It is neither rendered in WebChat nor injected into the next turn's context.
Impact
Workflow paralysis. The agent cannot see its own previous reply, so it repeats work or skips conclusions. User also cannot see the missing content. Multiple occurrences in one session rendered the workflow inoperable, forcing a version rollback.
Environment
Symptoms
Gateway Log Evidence
Session JSONL Evidence
After the tool call and its result, the expected assistant follow-up message is absent:
{"type":"message","message":{"role":"assistant","content":[ {"type":"thinking",...}, {"type":"text","text":"initial analysis..."}, {"type":"toolCall",...} ]}} {"type":"message","message":{"role":"toolResult",...}} // Expected: another assistant message with final text // Actual: next entry is a user message — final text never writtenNotes