You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
TUI: streaming message replaced by concurrent update #10704
When a tool call (like file edit) completes while a message is still streaming to the TUI, the in-flight response is replaced by a subsequent message instead of being allowed to complete.
Steps to Reproduce
Generate a longer response that will take a few seconds to stream
While streaming is happening, execute a tool call (e.g., edit to update a file)
Once the tool completes, a new message is sent to the TUI
Expected: The streaming message continues and completes; subsequent messages queue or appear after Actual: The incomplete streaming message is dropped and replaced by the new message, losing the partial content
Example
I generated a recap message (visible in TUI), then called edit to update MEMORY.md. While my response was mid-stream, the edit completed and a new message was sent. The TUI dropped the original streaming response and displayed only the new one.
Possible Root Cause
The TUI likely doesn't handle concurrent message updates gracefully. When a new message arrives while a previous one is still streaming, it should queue or merge, not replace.
Impact
Confusing UX: users see text appear, then suddenly vanish
Loss of information: partial responses are discarded
Activity
jayclawson commentedon Feb 10, 2026
Reproduction Case: Text Before Tool Calls Disappears
Environment:
Steps to Reproduce:
Expected: All text (pre-tool + post-tool) should remain visible
Actual: Only post-tool text remains after tool call completes
Examples:
Workarounds Tried:
Consistency: Happens with ALL tool calls (web_search, exec, sessions_history, Read, etc.)
This appears to match the "streaming message replaced by concurrent update" description from the original issue.
vignesh07 commentedon Feb 15, 2026
Thanks for the report — revalidated and fixed on
main.Merged:
61228639cfix (tui): preserve active stream during concurrent run finalsb607c41a5chore (changelog): note TUI concurrent stream hardeningRoot cause:
chat.finalevents for a different run could clearactiveChatRunIdand triggerloadHistory()while another run was still streaming.loadHistory()clears the chat log, which caused the in-flight partial stream to disappear/appear replaced.Fix:
Regression coverage:
src/tui/tui-event-handlers.test.ts(does not reload history or clear active run when another run final arrives mid-stream).pnpm vitest src/tui/tui-event-handlers.test.ts.Closing as fixed on
main.fix(tui): preserve in-flight streaming replies on concurrent run fina…