claude-code - 💡(How to fix) Fix [FEATURE] Add setting to disable auto-collapsing of multi-line bash tool output

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

Fix Action

Fix / Workaround

The only workaround I found is to write output to an HTML file via the Write tool, which triggers the Launch preview panel. This works but requires Claude to run a multi-step pipeline (PTY capture → ANSI-to-HTML conversion → file write) instead of a single bash command. It costs extra tokens and adds latency for every chart.

Code Example

{
  "inlineOutputCommands": ["tplot", "glow", "bat", "rich"]
}

---

{
  "bashOutputCollapse": "auto"  // default: collapse everything \\
  "bashOutputCollapse": "never" // never collapse
  "bashOutputCollapse": 50      // collapse only if output exceeds N lines
}
RAW_BUFFERClick to expand / collapse

Preflight Checklist

  • I have searched existing requests and this feature hasn't been requested yet
  • This is a single feature request (not multiple features)

Problem Statement

Claude Code collapses any multi-line bash tool output behind a "Ran <command>" chevron, requiring the user to press Ctrl+O to expand it. For most use cases this is fine — but it breaks workflows where the bash output is the result, not just a log.

My specific case: I use tplot, a terminal charting CLI, which Claude Code is instructed (via CLAUDE.md) to use whenever answering data questions. The entire value of tplot is seeing the chart inline. When Claude runs tplot bar - -x region -y revenue the output is a colored Unicode chart — but it's immediately collapsed, making it invisible unless I manually expand every single tool call.

This also affects any other terminal visualization tool (e.g. glow, rich, sparklines, bat).

Proposed Solution

Option A — Command whitelist (minimal change, high impact) Allow users to specify commands whose output should never be collapsed, rendered inline directly in the response thread:

{
  "inlineOutputCommands": ["tplot", "glow", "bat", "rich"]
}

When Claude runs a whitelisted command, the output appears inline in the conversation — seamlessly embedded in the response, not in a separate collapsible tool block. This keeps bash output for git, npm, find etc. collapsed as usual (where it belongs), while visualization output flows naturally into the reply.

Option B — Global threshold (blunt but simple)

{
  "bashOutputCollapse": "auto"  // default: collapse everything \\
  "bashOutputCollapse": "never" // never collapse
  "bashOutputCollapse": 50      // collapse only if output exceeds N lines
}

Option C — Inline rendering (ideal, larger effort) The best experience would be if whitelisted command output were rendered as part of the assistant message itself — not as a separate tool result block at all. Similar to how code blocks or images appear inline in a response today. The chart would sit between paragraphs of text, exactly where Claude placed it, with no chevron, no separate block, no Ctrl+O.

This mirrors how tools like Jupyter notebooks embed output inline with narrative — the chart is part of the answer, not an appendix.

Alternative Solutions

The only workaround I found is to write output to an HTML file via the Write tool, which triggers the Launch preview panel. This works but requires Claude to run a multi-step pipeline (PTY capture → ANSI-to-HTML conversion → file write) instead of a single bash command. It costs extra tokens and adds latency for every chart.

Priority

Medium - Would be very helpful

Feature Category

CLI commands and flags

Use Case Example

  1. I want to stay in terminal, the plot says more than 1000 words
  2. I built the tplot cli tool that follows the best steps from the book "Storytelling with data"
  3. I want to use this library by claude when doing some analysis

Additional Context

here is the repo to library: https://github.com/TomekNocon/tplot

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING