claude-code - 💡(How to fix) Fix [BUG] Run-in-terminal button missing on code blocks without explicit bash/shell language tag [1 comments, 1 participants]

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…
GitHub stats
anthropics/claude-code#57761Fetched 2026-05-11 03:26:07
View on GitHub
Comments
1
Participants
1
Timeline
5
Reactions
0
Author
Participants
Timeline (top)
labeled ×2commented ×1cross-referenced ×1unlabeled ×1

Error Message

Error Messages/Logs

None — this is a UI affordance issue, not a runtime error.

Root Cause

This is inconsistent and confusing because Claude often produces shell commands without an explicit language tag in its responses. The user has no visual indication that the same command would be runnable if it had been tagged differently.

Code Example

Nonethis is a UI affordance issue, not a runtime error.
RAW_BUFFERClick to expand / collapse

Preflight Checklist

  • I have searched existing issues and this hasn't been reported yet
  • This is a single bug report (please file separate reports for different bugs)
  • I am using the latest version of Claude Code

What's Wrong?

Hi Anthropic team,

The ▷ "Run in terminal" button only appears on code blocks tagged with an explicit shell language (e.g. ```bash). For code blocks rendered without a language tag (just plain triple-backticks), only the 📋 Copy icon appears — no Run button.

This is inconsistent and confusing because Claude often produces shell commands without an explicit language tag in its responses. The user has no visual indication that the same command would be runnable if it had been tagged differently.

I could not find this behavior documented anywhere.

Note: This is about Claude Desktop (Mac app) v1.6608.0, not the Claude Code CLI. Related to #57299.

What Should Happen?

The ▷ "Run in terminal" button should appear consistently on all shell-command code blocks, regardless of whether the language tag is present. The detection can be based on heuristics (command starts with a known shell command, contains shell syntax, etc.).

Alternatively, if the current behavior is intentional, it should be clearly documented so users know to expect a language tag.

Error Messages/Logs

None — this is a UI affordance issue, not a runtime error.

Steps to Reproduce

  1. Ask Claude for a shell command in a way that produces a plain code block (triple-backticks without language tag)
  2. Observe: only the 📋 Copy icon appears on the code block
  3. Ask Claude for the same command and request the response use a ```bash tagged code block
  4. Observe: both the 📋 Copy and ▷ Run-in-terminal buttons appear

Claude Model

Opus

Is this a regression?

I don't know

Last Working Version

No response

Claude Code Version

Claude for Mac 1.6608.0 (build f65729) — note: this is Claude Desktop, not Claude Code CLI

Platform

Anthropic API

Operating System

macOS 26.5 Tahoe

Terminal/Shell

Terminal.app (macOS)

Additional Information

Platform note: This is Claude Desktop for Mac (the desktop app), not the Claude Code CLI or direct API integration. The "Platform" field above was filled with "Anthropic API" because no Desktop option was available in the dropdown.

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 [BUG] Run-in-terminal button missing on code blocks without explicit bash/shell language tag [1 comments, 1 participants]