[BUG] Run-in-terminal button missing on code blocks without explicit bash/shell language tag
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report (please file separate reports for different bugs)
- [x] 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
- Ask Claude for a shell command in a way that produces a plain code block (triple-backticks without language tag)
- Observe: only the 📋 Copy icon appears on the code block
- Ask Claude for the same command and request the response use a ```bash tagged code block
- 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.
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗