Skip to content

openclaw tui terminal cannot receive real-time messages #38829

Closed

Description

@galen2017

Environment: - OS: macOS (Darwin 25.3.0) - OpenClaw: 2026.3.2 (85377a2) - Terminal: openclaw-tui Bug Description: When using openclaw tui for terminal chat, historical messages display correctly, but real-time new messages are not received. Messages only appear after exiting and re-entering the terminal. Steps to Reproduce: 1. Run openclaw tui to start terminal chat 2. Send a message to the agent from web UI or other channel 3. Terminal does not show the new message in real-time 4. Must exit and re-enter to see the message in history Attempted Solutions: - ✅ Restarted Gateway (openclaw gateway restart) - ❌ Issue persists Expected Behavior: Terminal should display new messages in real-time, just like the web UI

Activity

  1. openclaw-barnacle commented on Apr 22, 2026

    @openclaw-barnacle

    This issue has been automatically marked as stale due to inactivity.
    Please add updates or it will be closed.

  2. added
    stale
    on Apr 22, 2026
  3. clawsweeper commented on Apr 26, 2026

    @clawsweeper
    Contributor

    Codex review: keeping this open for maintainer follow-up; there is still a little grit to resolve. Reviewed July 8, 2026, 8:20 AM ET / 12:20 UTC.

    Summary
    Keep open: current main and the latest release still lack TUI handling for live session.message transcript events, and the open closing PR that targets this exact gap has not merged.

    Reproducibility: yes. at source level: the Gateway emits displayable transcript appends as session.message, while the TUI subscribes to session events but does not dispatch that event into a history refresh path. I did not run a fresh live terminal reproduction in this read-only review.

    Root-cause cluster
    Relationship: canonical
    Canonical: #38829
    Summary: This issue is the canonical selected-session TUI live transcript bug; the open PR is the current fix candidate, while broader observer-style cross-channel visibility remains separate.

    Members:

    Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything.

    Next step
    No separate fix job should be queued because #96252 is the open closing PR for the narrow repair path.

    Review details

    Best possible solution:

    Review and land #96252 if it remains the accepted narrow fix; keep broader opt-in cross-channel observer behavior tracked separately in #40678.

    Do we have a high-confidence way to reproduce the issue?

    Yes at source level: the Gateway emits displayable transcript appends as session.message, while the TUI subscribes to session events but does not dispatch that event into a history refresh path. I did not run a fresh live terminal reproduction in this read-only review.

    Is this the best way to solve the issue?

    Yes: the best path is the existing narrow TUI fix that consumes the current Gateway event contract without adding protocol, config, provider, or plugin surface. This issue should remain open until the linked PR merges or is explicitly rejected.

    AGENTS.md: found and applied where relevant.

    Remaining risk / open question:

    • The active fix PR is still open, behind the base branch, and proof-gated, so closing the issue now would remove the canonical tracker before the behavior is on main.
    • This read-only review established a source-level reproduction path but did not run a fresh live terminal scenario against current main.

    Codex review notes: model internal, reasoning high; reviewed against 4bf70be01a21.

    Label changes

    Label justifications:

    • P2: This is a normal-priority TUI live transcript bug with a restart or re-entry workaround and limited blast radius.
    • impact:session-state: The running TUI view can fall out of sync with the current session transcript until the user reloads it.
    • impact:message-loss: Messages appended from another surface are not visible in the live TUI even though they can appear later in history.
    Evidence reviewed

    What I checked:

    • Current TUI event dispatcher gap: On current main, the TUI dispatches chat, chat.side_result, agent, and sessions.changed events, but has no session.message branch for displayable transcript appends. (src/tui/tui.ts:1552, 4bf70be01a21)
    • Gateway emits the needed event: The Gateway transcript-update broadcaster sends displayable transcript appends to subscribers as session.message with session key, optional agent id, message metadata, and session snapshot fields. (src/gateway/server-session-events.ts:211, 4bf70be01a21)
    • TUI subscribes but does not consume the message event: The TUI Gateway client calls sessions.subscribe, so broad session events can reach it; the remaining source-level gap is TUI-side handling of session.message. (src/tui/gateway-chat.ts:200, 4bf70be01a21)
    • Latest release still has the same dispatcher shape: Tag v2026.6.11 points at e085fa1a3ffd32d0ea6917e1e6fb4ecbffbb77d2, and the released TUI dispatcher also lacks a session.message branch. (src/tui/tui.ts:1533, e085fa1a3ffd)
    • Open linked fix candidate: Live PR metadata shows fix(tui): handle live session message updates #96252 is open, unmerged, uses closing syntax for this issue, and changes the TUI live session-message handling path. (b0253c29756b)
    • Maturity fallback inspection: The maturity helper could not run because its yaml package was unavailable, so I inspected the checked-out scorecard directly; TUI is M2 Alpha, so maturity:stable does not apply. (qa/maturity-scores.yaml:1312, 4bf70be01a21)

    Likely related people:

    • steipete: Assigned on the active fixing PR and authored the latest rewrite/proof commits on the current candidate branch for this exact TUI live-update bug. (role: likely follow-up owner; confidence: high; commits: a82c5fa92887, 42527bbf54b3, b0253c29756b; files: src/tui/tui-event-handlers.ts, src/tui/tui-session-actions.ts, src/tui/tui.ts)
    • vincentkoc: Authored the earlier closed PR for live transcript subscription and appears in current blame/recent TUI history for the dispatcher and Gateway client surfaces. (role: prior same-root repair author and recent area contributor; confidence: medium; commits: 9421edb6e689, 9b49387ad8c2, 29857e25aaee; files: src/tui/gateway-chat.ts, src/tui/tui-event-handlers.ts, src/tui/tui.ts)
    • harjothkhara: Opened the active linked PR with initial commits targeting this issue's missing TUI live session-message handling. (role: current fix PR author; confidence: medium; commits: ecc6c0503a8c, 3c804a7c40b5; files: src/tui/tui-event-handlers.ts, src/tui/tui.ts, src/tui/tui-types.ts)
    • xialonglee: Recently worked on sessions.changed reload and run/history dedupe invariants in the same TUI event-handler area. (role: recent adjacent TUI session-state contributor; confidence: medium; commits: 6192b037bbb5; files: src/tui/tui-event-handlers.ts)
    How this review workflow works
    • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
    • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
    • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
    • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
    • Maintainers can also comment @clawsweeper review to request a fresh review only.
    • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
    • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
    • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.
  4. removed
    stale
    on Apr 26, 2026
  5. added
    P2
    impact:message-loss
    impact:session-state
    clawsweeper:source-repro
    clawsweeper:linked-pr-open
    clawsweeper:no-new-fix-pr
    issue-rating: 🦞 diamond lobster
    on May 16, 2026
  6. openclaw-barnacle commented on Jun 7, 2026

    @openclaw-barnacle

    This issue has been automatically marked as stale due to inactivity.
    Please add updates or it will be closed.

  7. added
    stale
    and removed
    stale
    on Jun 7, 2026
  8. removed
    clawsweeper:no-new-fix-pr
    on Jun 16, 2026
  9. 1 remaining item

  10. added
    clawsweeper:linked-pr-open
    clawsweeper:no-new-fix-pr
    on Jun 25, 2026
  11. added
    issue-rating: 🐚 platinum hermit
    clawsweeper:needs-live-repro
    issue-rating: 🦞 diamond lobster
    clawsweeper:source-repro
    and removed
    clawsweeper:source-repro
    issue-rating: 🦞 diamond lobster
    clawsweeper:needs-live-repro
    issue-rating: 🐚 platinum hermit
    on Jul 6, 2026
  12. added a commit that references this issue on Jul 27, 2026
    ac6009e
  13. steipete commented on Jul 27, 2026

    @steipete
    Contributor

    Thank you for reporting the missing real-time terminal updates. I verified this exact behavior is now fixed on main by #114443 (commit ac6009e).

    The landed regression starts a real Gateway-backed terminal, connects a separate authenticated Gateway client, sends a message into the same session, and verifies that the already-running terminal displays both the exact external message and the completed follow-up without restarting. The TUI consumes the existing session.message event through the agent-scoped, serialized history reload path; no new protocol or settings are required.

    The exact reviewed head passed the full Linux terminal suite, the real Gateway-backed PTY cases, and GitHub CI: https://github.com/openclaw/openclaw/actions/runs/30249714468. The original reporter and both prior fix contributors are credited in #114443.

    Closing as fixed by the merged, independently tested real two-client Gateway scenario.

  14. added a commit that references this issue on Jul 28, 2026
    ad0c711
  15. locked as resolved and limited conversation to collaborators on Sep 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2clawsweeper:linked-pr-openclawsweeper:no-new-fix-prclawsweeper:source-reproimpact:message-lossimpact:session-stateissue-rating: 🦞 diamond lobster

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions