You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[FEATURE]: Collapsible tool output (code/diff/blocks) in TUI #40096
I have verified this feature I'm about to request hasn't been suggested before.
Tool output blocks (Write, Edit, Shell, GenericTool) render fully expanded, adding noise in long sessions and making chain-of-thought hard to follow.
Request: Add a global toggle (/collapse slash command + optional keybind) that collapses all tool blocks to a summary line (file name / diff stats / line count). Per-block click-to-expand via local override on top of the global mode.
changed the title [-]Collapsible tool output (code/diff/blocks) in TUI[/-][+][FEATURE]: Collapsible tool output (code/diff/blocks) in TUI[/+]on Aug 1, 2026
Thanks for updating the issue! It now follows the contributing guidelines and the needs:compliance label has been removed. We appreciate you including a working prototype — that's very helpful context.
The approach in this issue (global /collapse toggle + per-block click) is broader than #14511 — it adds a persistent toggle mode (not just last-output), a slash command, and a KV-backed global state. But the core UX overlap is real.
Happy to consolidate if maintainers prefer one approach over the other.
#54039 adds this to the v1 TUI as a tui.json setting rather than a toggle. tool_output.collapse sets how many lines each tool block shows before Click to expand, per group (bash, generic for plugin and MCP tools, write, edit, apply_patch) or per tool name. 0 collapses a block to just its title or command, so every tool call takes one line until clicked, and "never" keeps it fully expanded. Write, edit and patch blocks gain the expand toggle too. There's no slash command or keybind for a global switch.
Thanks for the detailed request and the prototype, @aravasio!
To restate it: you'd like a global collapse mode for tool blocks (Write, Edit, Shell, generic tools) in the TUI, toggled with a /collapse command or an optional keybind. Each block would shrink to a one-line summary (file name, diff stats or line count), and you could click a block to expand it on top of the global mode.
For reference, v2 already has some related controls, though none of them collapse every tool block:
session.verbosity (low / medium / high), which the Verbosity command cycles through. low summarizes each run of tools and thoughts.
session.grouping, which controls grouping of exploration items.
Shell output is already cut down to a short preview that you can click to expand.
Maintainers will look at this request and decide on the direction. Since you offered a PR, it's probably best to wait for their input on the design, for example whether this should go into the existing verbosity setting or be a separate toggle.
Activity
[-]Collapsible tool output (code/diff/blocks) in TUI[/-][+][FEATURE]: Collapsible tool output (code/diff/blocks) in TUI[/+]github-actions commentedon Aug 1, 2026
Thanks for updating the issue! It now follows the contributing guidelines and the
needs:compliancelabel has been removed. We appreciate you including a working prototype — that's very helpful context.aravasio commentedon Aug 1, 2026
Related existing issues:
Click to expand#14511 — Keyboard shortcut to toggle tool outputClick to expand. Requests a keybind to expand/collapse the last tool call.The approach in this issue (global
/collapsetoggle + per-block click) is broader than #14511 — it adds a persistent toggle mode (not just last-output), a slash command, and a KV-backed global state. But the core UX overlap is real.Happy to consolidate if maintainers prefer one approach over the other.
zhiganov commentedon Sep 3, 2026
A V2-specific case that strengthens this request: the invocation text itself can dominate the screen, even before there is any output.
Environment:
v0.0.0-beta-18992TERM=xterm-256colorExamples from separate routine operations include:
git diffnode -escript that compares two OpenAPI specificationsThe generated script is the clearest case. A command shaped like this can wrap across half the viewport by itself:
This means collapsing or truncating only the tool result is insufficient. The TUI needs to collapse both the invocation and its output.
A useful compact presentation would be:
The full invocation and result could be expanded independently. Errors and permission requests could remain expanded automatically.
Nowaker commentedon Oct 9, 2026
#54039 adds this to the v1 TUI as a
tui.jsonsetting rather than a toggle.tool_output.collapsesets how many lines each tool block shows before Click to expand, per group (bash,genericfor plugin and MCP tools,write,edit,apply_patch) or per tool name.0collapses a block to just its title or command, so every tool call takes one line until clicked, and"never"keeps it fully expanded. Write, edit and patch blocks gain the expand toggle too. There's no slash command or keybind for a global switch.{ "tool_output": { "collapse": { "bash": 0, "generic": 0, "write": 0, "edit": 0, "apply_patch": 0 } } }This comment is AI generated, but under direct supervision and on request of @Nowaker.
opencodejr commentedon Oct 28, 2026
Thanks for the detailed request and the prototype, @aravasio!
To restate it: you'd like a global collapse mode for tool blocks (Write, Edit, Shell, generic tools) in the TUI, toggled with a
/collapsecommand or an optional keybind. Each block would shrink to a one-line summary (file name, diff stats or line count), and you could click a block to expand it on top of the global mode.For reference, v2 already has some related controls, though none of them collapse every tool block:
session.verbosity(low/medium/high), which the Verbosity command cycles through.lowsummarizes each run of tools and thoughts.session.grouping, which controls grouping of exploration items.Maintainers will look at this request and decide on the direction. Since you offered a PR, it's probably best to wait for their input on the design, for example whether this should go into the existing verbosity setting or be a separate toggle.