[BUG] Desktop: Run button not offered on powershell/pwsh/ps1 code blocks, though Run itself executes PowerShell on Windows
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report
- [x] I am using the latest version of Claude Code
What's Wrong?
In the desktop app's Code tab, the Run (▷) and send-to-terminal buttons on chat code blocks are gated on the fence language tag, and PowerShell tags are not on the allowlist. On Windows this is backwards: the Run button executes powershell.exe (see #89884), so a ```powershell block is the one block guaranteed to be valid for the target shell — and it is the only kind denied the button.
Tested one trivial command across seven fence tags in a single response:
| Fence tag | Run + terminal buttons |
|---|---|
| bash | yes |
| sh | yes |
| shell | yes |
| powershell | no (copy only) |
| pwsh | no (copy only) |
| ps1 | no (copy only) |
| (none) | no (copy only) |
The practical effect is that on a Windows machine the model has to mislabel PowerShell commands as ``bash to make them runnable, or wrap them as powershell -Command "..."` inside a bash fence. Both are worse than tagging them correctly.
What Should Happen?
Add powershell, pwsh, and ps1 to the set of fence tags that get the Run button.
Ideally the fence language would also pick the shell (route bash to Git Bash where available, powershell/pwsh to PowerShell) — that is item 2 of #89884's proposed fixes. But even without shell routing, allowlisting the PowerShell tags is strictly an improvement on Windows, where the button already lands in PowerShell.
Steps to Reproduce
- Windows desktop app, Code tab.
- Ask Claude to emit the same command in a ``
bash fence and in a``powershell fence. - The bash block renders Run + send-to-terminal + copy; the powershell block renders copy only.
Is this a regression?
No — as far as I can tell it has always behaved this way.
Claude Code Version
Desktop app 1.46388.4.0 (bundled CLI 2.1.260)
Platform
Claude Desktop app (Code tab)
Operating System
Windows 11 Pro 25H2 (10.0.26200)
Terminal/Shell
Windows PowerShell 5.1.26100.8875 (pwsh 7 also installed)
Related
- #89884 — open; same surface, about which PowerShell binary Run uses. Its fix #2 ("honor the fence language") overlaps with this report, but its subject is the binary choice, not the tag allowlist.
- #57761 — closed as not planned; asked for Run on untagged blocks via heuristics. This report is narrower: three explicit, unambiguous language tags, no heuristics needed.
Screenshot
<img width="890" height="916" alt="Image" src="https://github.com/user-attachments/assets/fca34588-b5f1-41b5-a9b9-9cee4910cba0" />
This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗