Skip to content

bug(cli): TUI tool cards settle to "(no output)" and stay stuck once scrolled out of the viewport #3521

Description

@Astro-Han

What happened

In the TUI, every settled tool card renders its compact row with the (no output) placeholder (e.g. ● Skill (no output)), and expanding the card shows no result body. Cards still inside the live viewport recover when the turn terminates, but any card that scrolled above the viewport before turn end keeps (no output) permanently. Ctrl+O / Ctrl+T only retarget roughly the last screenful of entries; earlier cards can be neither expanded nor collapsed.

Expected: a settled tool card shows its real outcome summary, and Ctrl+O reveals the result, regardless of where the card sits in the transcript.

Root cause (diagnosis on main @ 1ddbd25)

  1. The Runtime Host live tool_result broadcast deliberately omits content: session-continuity-coordinator.ts projects only status / durationMs (the wire type SessionToolEvent has no content field, since feat(runtime-host): add session continuity #1358), and the CLI-side adapter/session-projector.ts substitutes { kind: 'text', text: '' }. A tool card therefore settles into the (no output) placeholder the moment it completes. (packages/ui documents the same contract: "RH live tool_result deliberately omits content (empty text)".)
  2. Real content is backfilled only at turn terminal: onTurnTerminal → loadCurrentMessages → reconcileToolsWithStoredMessages. There is no mid-turn trigger — the CLI does not consume subscription.transcript_advanced frames.
  3. Entries above renderGeometry.viewportTop have frozen renders (fix(cli): freeze off-screen entry renders to prevent scrollback-clearing redraws #1139): reconciliation updates entry state but cannot rewrite lines already in terminal scrollback, so scrolled-off cards keep (no output) forever.
  4. Ctrl+O / Ctrl+T are viewport-anchored by design (fix(cli): anchor Ctrl+O/Ctrl+T expansion to the live viewport so toggles never clear scrollback #1130): only entries at or after viewportTop are retargeted, so the stuck cards can be neither expanded nor collapsed. A card that scrolled away while expanded stays expanded.

Reproduced with a scratch transcript test driving the exact live sequence (live tool_start + content-less tool_result → advance viewportTop → turn-terminal reconcile): in-viewport cards recover (e.g. (1 line · 9 bytes)); scrolled-off cards stay (no output) and ignore toggles.

How to reproduce

  1. Start a TUI session from source on main.
  2. Run a turn with enough tool calls that the earliest cards scroll out of view (a single long autonomous turn suffices).
  3. Observe: settled cards read (no output); after the turn completes, only the last screenful populates; Ctrl+O/Ctrl+T do not affect earlier cards.

Environment

  • Maka commit: 1ddbd25 (main, 2026-08-22)
  • Surface: TUI / CLI
  • OS: macOS

Fix directions

Diagnosis drafted with AI assistance (Maka); mechanism verified against source and a throwaway transcript-level reproduction.

Metadata

Metadata

Assignees

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