Skip to content

TUI: streaming message replaced by concurrent update #10704

@axschr73

Description

@axschr73

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

  1. Generate a longer response that will take a few seconds to stream
  2. While streaming is happening, execute a tool call (e.g., edit to update a file)
  3. 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingtuiTerminal UI changes

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions