bug(cli): compact tool rows read empty for quiet or nested-args tools — no 'what' without expanding
#3,338 opened on Aug 20, 2026
Repository metrics
- Stars
- (1 star)
- PR merge metrics
- (No merged PRs in 30d)
Description
Symptom (Current)
In the TUI/CLI transcript, the compact tool row reads ● Bash (no output) for any quiet Bash call — a successful mkdir, git add, cd, export, etc. The annotation slot carries only the result (no output / N lines / exit code), and for quiet commands there is no result text, so the whole row collapses to name + no output.
Because the compact row's input summary (toolInputSummary) is suppressed or truncated, the user cannot see what ran without expanding. Expanding (Ctrl+O) then dumps the full output card — the opposite extreme, "too much". The result: quiet commands are invisible, and there is no middle ground between "empty" and "firehose".
The task_* ledger tools (task_create, task_update, …) have the same shape: their args/result are nested JSON, so the row shows the tool name with no legible subject or count.
Root cause (verified on main @ 9d4392c8)
packages/cli/src/pi-transcript-tools.tsrenderCompactToolBlock()lays out● Name target (annotation)wheretarget = toolInputSummary(entry).toolInputSummary()(same file, ~line 715) has explicit per-tool cases forBash/Read/Write/Edit/Grep/Glob/WriteStdin/maka_computerplus aformatToolInvocationLinegeneric fallback. ForBashit returns$ <command>.compactAnnotation()builds the(...)part from the result only:compactToolSummary()returnsnoOutput()(dimno output) when a successfulshell_run/terminalresult has zero output lines. The command the row should be named by is present ininput, but when the input summary is empty/long and the annotation isno output, the visible row degenerates to● Bash (no output).task_*tools have no per-tool case, so they fall to the genericformatToolInvocationLinefallback, which flattens nestedtasks: [...]into a multi-line kv dump thatcollapseToSingleLinecannot turn into a legible subject.
So the gap is not "no data" — the command is in input — but the compact row does not reliably surface the what for quiet or nested-args tools, and the only escape is the full expanded card.
Scope — TUI/CLI compact-row what + outcome signal
This issue is the TUI/CLI counterpart to the Desktop collapsed-row gap in #3336. Both are "the compact/collapsed row doesn't say what the call did", but they live in different surfaces and formatters:
- Desktop:
packages/ui/src/tool-activity.tsx+formatToolInvocationLine→ collapsed row / group header (#3336). - TUI/CLI:
packages/cli/src/pi-transcript-tools.tsrenderCompactToolBlock/toolInputSummary/compactAnnotation→ compact row (this issue).
Proposed fix (Planned)
P0 — make the compact row always name the what, independent of output:
- Ensure
toolInputSummary's per-toolBashcase (and the generic fallback) always contributes the command/subject to the row even when the annotation isno output— i.e. a quietBashreads● Bash $ git add -A (no output), never● Bash (no output). - Add
task_*per-tool cases totoolInputSummarysotask_createshows the first subject (+ count) instead of a JSON dump.
P1 — middle ground between compact and full-expand: consider a single-line result preview (first output line / headline) on the compact row or as a low-cost toggle, so "what happened" is reachable without Ctrl+O firehose.
Acceptance
- A quiet
Bash(no stdout) compact row shows the command; theno outputannotation is secondary, never the only content. task_create/task_updatecompact rows show a legible subject/count, not a JSON dump.- Expanding still reveals the full card; truncation protects fixed-shape annotations (existing
protectcontract preserved).