-
-
Notifications
You must be signed in to change notification settings - Fork 38.3k
Description
Description
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.,
editto 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
- Looks like a crash or error when it's not