-
-
Notifications
You must be signed in to change notification settings - Fork 80.7k
TUI streaming indicator stays active long after response content finishes #67052
Copy link
Copy link
Closed
Labels
P3Low-priority cleanup, docs, polish, ergonomics, or speculative work.Low-priority cleanup, docs, polish, ergonomics, or speculative work.clawsweeper:fix-shape-clearClawSweeper found a clear likely implementation shape for this issue.ClawSweeper found a clear likely implementation shape for this issue.clawsweeper:needs-maintainer-reviewClawSweeper marked this issue as needing maintainer review before automation.ClawSweeper marked this issue as needing maintainer review before automation.clawsweeper:needs-product-decisionClawSweeper marked this issue as needing a product or behavior decision.ClawSweeper marked this issue as needing a product or behavior decision.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.ClawSweeper does not recommend queueing a new automated fix PR for this issue.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.ClawSweeper found a high-confidence source-level issue reproduction.impact:session-stateSession, memory, transcript, context, or agent state can drift or corrupt.Session, memory, transcript, context, or agent state can drift or corrupt.issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.Very strong issue quality with high-confidence source-level or clear reproduction.
Description
Metadata
Metadata
Assignees
Labels
P3Low-priority cleanup, docs, polish, ergonomics, or speculative work.Low-priority cleanup, docs, polish, ergonomics, or speculative work.clawsweeper:fix-shape-clearClawSweeper found a clear likely implementation shape for this issue.ClawSweeper found a clear likely implementation shape for this issue.clawsweeper:needs-maintainer-reviewClawSweeper marked this issue as needing maintainer review before automation.ClawSweeper marked this issue as needing maintainer review before automation.clawsweeper:needs-product-decisionClawSweeper marked this issue as needing a product or behavior decision.ClawSweeper marked this issue as needing a product or behavior decision.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.ClawSweeper does not recommend queueing a new automated fix PR for this issue.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.ClawSweeper found a high-confidence source-level issue reproduction.impact:session-stateSession, memory, transcript, context, or agent state can drift or corrupt.Session, memory, transcript, context, or agent state can drift or corrupt.issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.Very strong issue quality with high-confidence source-level or clear reproduction.
Type
Fields
Priority
None yet
Description
When using OpenClaw TUI (
openclaw tui), the streaming status indicator (e.g.,streaming • 1m 50s) continues to display for a significant duration after the assistant has finished producing visible content. This makes it impossible for the user to tell whether the response is complete.Expected Behavior
The TUI should transition from "streaming" to "idle" promptly after the last content token is delivered.
Actual Behavior
The status bar shows
streaming • Xm Xsfor 30-120+ seconds after the response text has stopped updating. The user cannot determine if the assistant is still working or has finished.Root Cause Analysis
After tracing through the source, the delay appears to be between the model finishing its response and the gateway emitting the
chatevent withstate: "final":runEmbeddedPiAgentreturnsemitAgentEvent({ stream: "lifecycle", data: { phase: "end" } })firesfinalizeLifecycleEvent()inserver.implprocesses the lifecycle endemitChatFinal()broadcasts{ state: "final" }to WebSocket clientsstate: "final"→ callsfinalizeRun()→ setsactivityStatus = "idle"The gap between steps 1-2 and step 4 reaching the TUI client is where the perceived delay occurs. Post-run work (session persistence, delivery, buffer flushing, cleanup) all happen before or during the final broadcast, extending the visible "streaming" state.
Environment
openclaw tui(WebSocket)Possible Improvements
finaleventImpact
This is a UX issue — no data loss or functional impact, but it significantly hurts the interactive experience as users cannot tell when a response is done.