claude-code - 💡(How to fix) Fix Feature request: verbatim/bash-only mode for slash commands

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…

A custom slash command that runs an external CLI tool and prints its already-formatted Markdown output is a common pattern, but Claude Code today always requires the model to generate a response after the bash step. For commands that produce a fully-formatted answer on stdout, that round-trip is pure overhead — the bash output already is the response.

Adding a frontmatter flag like output-mode: verbatim (or auto-format: none) that makes the bash output the response and skips the post-bash LLM turn would unlock significant savings for this whole class of commands.

Root Cause

A custom slash command that runs an external CLI tool and prints its already-formatted Markdown output is a common pattern, but Claude Code today always requires the model to generate a response after the bash step. For commands that produce a fully-formatted answer on stdout, that round-trip is pure overhead — the bash output already is the response.

Adding a frontmatter flag like output-mode: verbatim (or auto-format: none) that makes the bash output the response and skips the post-bash LLM turn would unlock significant savings for this whole class of commands.

Fix Action

Fix / Workaround

Happy to provide more details, share the actual /cost overlay output, or test patches if useful.

Code Example

---
allowed-tools: Bash
model: haiku
description: Morning briefing
argument-hint: "[since: 3d | monday | YYYY-MM-DD]"
---

The bash command below produces a fully-formatted Markdown briefing.
**Do not paraphrase, summarize, restructure, translate, or comment on it.
Do not write any text after it. Just let the bash output be the response.**

!`some-cli standup ${ARGUMENTS}`

---

---
allowed-tools: Bash
output-mode: verbatim   # ← new flag
description: Morning briefing
---

!`some-cli standup ${ARGUMENTS}`
RAW_BUFFERClick to expand / collapse

Feature request: verbatim/bash-only mode for slash commands

Summary

A custom slash command that runs an external CLI tool and prints its already-formatted Markdown output is a common pattern, but Claude Code today always requires the model to generate a response after the bash step. For commands that produce a fully-formatted answer on stdout, that round-trip is pure overhead — the bash output already is the response.

Adding a frontmatter flag like output-mode: verbatim (or auto-format: none) that makes the bash output the response and skips the post-bash LLM turn would unlock significant savings for this whole class of commands.

Concrete use case

Our CLI tool (some-cli standup) produces a fully-formatted Markdown briefing on stdout — sections, tables, bullets, the lot. The user wants to see that exact output. Our slash command is intentionally a thin shim:

---
allowed-tools: Bash
model: haiku
description: Morning briefing
argument-hint: "[since: 3d | monday | YYYY-MM-DD]"
---

The bash command below produces a fully-formatted Markdown briefing.
**Do not paraphrase, summarize, restructure, translate, or comment on it.
Do not write any text after it. Just let the bash output be the response.**

!`some-cli standup ${ARGUMENTS}`

What we want is: bash runs, output is shown, done. The LLM round-trip is unnecessary work.

What happens today

After the bash step Claude Code requires the model to generate a response. Even with very strong instructions (we tried multiple wordings), the model:

  1. Re-reads the entire bash output into its context (cache write).
  2. Produces 1k+ output tokens that re-render the same content the user already saw.

We did manage to reduce the cost meaningfully by setting model: haiku in frontmatter — Claude Code resolves the short alias correctly and the round-trip becomes much cheaper. But the round-trip itself still happens.

Measured impact

For a single repo (/standup slash command, AWS Bedrock, default-Opus session):

VariantCost / runFactor
Original inline-orchestration command (Opus, ~380-line skill doing git/JIRA/Sonar inline)$0.81
Thin shim, default Opus, paraphrased response$0.247
Thin shim, model: haiku alias, paraphrased response$0.07810×
Underlying CLI run directly (no LLM)$0.02928×

The Haiku alias closes most of the gap. The remaining 2.7× delta vs. the raw CLI run is the unavoidable LLM round-trip — ~55k cache write tokens of the bash output plus ~1.8k output tokens regenerating it. A verbatim mode would close that delta.

What we'd want

Frontmatter flag (name TBD) that:

  • Skips the post-bash LLM turn entirely.
  • Streams bash stdout (and stderr on non-zero exit) directly to the conversation.
  • Compatible with the existing !-bash-syntax and ${ARGUMENTS} substitution.
---
allowed-tools: Bash
output-mode: verbatim   # ← new flag
description: Morning briefing
---

!`some-cli standup ${ARGUMENTS}`

Result: bash runs, its output appears in the conversation, the turn ends. No LLM call, no token cost beyond the bash tool itself.

Why this is broadly useful

Plenty of CLI tools already produce Markdown-formatted output that the user wants verbatim:

  • Briefing/standup commands (our case)
  • cat-style "show me file X" or "show me config Y" commands
  • Linter/test summary commands that print their own structured report
  • Any wrapper around a tool that already formats nicely

For all of these, the LLM round-trip is overhead — sometimes very expensive overhead at premium-model pricing.

Environment

  • Claude Code CLI v2.1.158
  • Provider: Amazon Bedrock
  • Use case: slash commands distributed to a development team via a self-update CLI

Happy to provide more details, share the actual /cost overlay output, or test patches if useful.

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

claude-code - 💡(How to fix) Fix Feature request: verbatim/bash-only mode for slash commands