[FEATURE] Allow tools/skills to mark output as "display only" — suppress model commentary after tool result

Resolved 💬 2 comments Opened Mar 4, 2026 by davidmoneil Closed Apr 2, 2026

Preflight Checklist

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

Problem Statement

When a tool or skill produces pre-formatted output (e.g., a task dashboard, status report, or formatted table), Claude reads the tool result and then adds its own summary, commentary, or follow-up questions on top of it — even when explicitly instructed not to.

This creates a frustrating loop where users must repeatedly tell Claude "just show the output, don't add anything." Instructions in CLAUDE.md, memory files, and even HTML comments embedded in the tool output itself are unreliable because:

  1. Each new session starts with a fresh model context
  2. The model's training to "be helpful" overrides prompt-level instructions
  3. There is no architectural mechanism to enforce "display this output as-is"

Real-world example

A /tasks skill runs a dashboard tool that produces a formatted markdown table. The user expects to see only the table. Instead, Claude outputs the table AND adds a narrative summary like "Here are the highlights..." or "Want me to work on any of these?" — despite three layers of instructions saying not to.

This has persisted across 4+ sessions of progressively hardening the instruction:

  • CLAUDE.md: Added a CRITICAL block
  • Auto-memory: Marked the rule as highest priority
  • Tool output: Appended an HTML comment instruction in every response

None reliably prevent the behavior because they're all instructions, not enforcement.

Proposed Solution

Add a displayOnly (or finalOutput) flag that tools can set on their result to signal: "Display this output to the user exactly as-is. Do not generate additional text before or after it."

Option A: Tool result flag

Tools could return a flag alongside their output:

{
  "output": "| ID | Task | Priority |\n|---|---|---|\n| 1 | Fix bug | P1 |",
  "displayOnly": true
}

When displayOnly: true, Claude Code would render the output directly and skip the model's response generation for that turn.

Option B: Skill-level configuration

Skills could declare in their SKILL.md that their output is final:

name: task-dashboard
displayOnly: true

Option C: Bash tool annotation

For Bash-based tools, a convention like a trailing marker:

<!-- CLAUDE:DISPLAY_ONLY -->

When detected in tool output, Claude Code suppresses the model's follow-up response.

Use Cases

  1. Task dashboards — Pre-formatted status views that should be displayed verbatim
  2. Health check reports — Structured output from monitoring tools
  3. Generated reports — Any tool that produces a complete, formatted artifact
  4. MCP server responses — Servers that return user-facing content the model shouldn't augment

Alternatives Considered

  1. CLAUDE.md instructions — Unreliable; model training overrides them
  2. Memory files — Same issue; instructions, not enforcement
  3. HTML comments in output — Model ignores them inconsistently
  4. AfterModel hook (#21531) — Would work but is a heavier solution; this is a simpler, targeted fix
  5. --quiet flag (#9340) — Addresses UI verbosity of tool calls, not model commentary after results

Impact

  • Enables reliable "display-only" tool output without fighting the model
  • Simple, targeted change vs. full response filtering infrastructure
  • Backward compatible — tools without the flag behave as they do today

Environment

  • Claude Code v2.2.x
  • Linux (affects all platforms)
  • Use case: Custom skills with pre-formatted output

View original on GitHub ↗

This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗