Skip to content

[Bug]: TUI erases already-streamed assistant text and doesn't show all output while streaming. Closing and reopening the session shows all text, but live streaming text is wrong. #28180

@dalehamel

Description

@dalehamel

Summary

#27674 is still an issue but i do not have permission to reopen it, so re-filing.

#27711 was shipped but it did not fix it.

I verified I am on the beta channel, running OpenClaw 2026.2.26 (bc50708) which should include, as this is shown in the header of openclaw tui:

🦞 OpenClaw 2026.2.26 (bc50708) — IPC, but it's your phone.

Steps to reproduce

Same as before, just give it prompts that get it to print text while using tools in between, I used a lorem ipsum example:

 please print lorem ipsum while using tools that don't show any personal information in between

Expected behavior

It should gradually show the text show up on the screen:

 Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.                                                  

 Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.                                                                  

 Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.                                                                       

 Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.  

Actual behavior

It prints bits, pauses when the tool runs, and then a lot of the text is never printed.

You can only see the full text upon exiting and re-opening tui. The bug has not been fixed.

OpenClaw version

OpenClaw 2026.2.26 (bc50708)

Operating system

ubuntu 24.04

Install method

npm using beta channel, on a commit that should have the fix

Logs, screenshots, and evidence

Image

Impact and severity

Affected: TUI only (Telegram and other channel integrations do not exhibit this)
Severity: Moderate — reasoning and pre-tool context is permanently lost from the session view
Frequency: Consistent, triggers on every response that includes at least one tool call
Consequence: Users cannot see the agent's reasoning or pre-tool narration; makes it harder to understand what the agent is doing and why

Additional information

I applied the fix, and even tried having claude sonnet debug this a bit myself but was never able to get anything working.

A regression test for this could be:

  • Give it a prompt that streams text while interleaving tool use
  • Record all text that was streamed
  • Close and reopen, look at what was caught with the buffer of the whole stream, they should be equal

Currently this test would fail, as the stream would be missing things.

I don't know how to write this test or fix it, but i did my best to show this in the gif

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions