Windows: bang (!) prompt commands intermittently produce no output - silent failure, no error, self-recovered after ~1 day
Bug report: ! prompt commands intermittently produce no output on Windows (broke after 2026-07-02 auto-update, self-recovered by 2026-07-03)
Summary: Typing ! <command> at the Claude Code prompt on Windows made a console
window flicker and vanish; no output was captured and the command did not appear to run.
This began mid-day 2026-07-02, shortly after an auto-update, on a machine where the same
commands had worked via ! less than half an hour earlier. Claude Code's own
Bash/PowerShell tools kept working throughout; only the ! prompt path broke.
As of 2026-07-03 the ! path works again on the SAME binary (2.1.187) in the SAME
session — so this is an intermittent failure, not a hard version regression. Filing
anyway because a silently-failing shell escape is nasty to diagnose: no error, no
output, just a window flicker, and it looks exactly like a broken machine or script.
Environment (from /doctor, 2026-07-03)
- Windows 11 Home Single Language 10.0.26200, win32-x64
- Claude Code native install, currently running 2.1.187
(path C:\Users\<user>\.local\bin\claude.exe)
- /doctor: "Last update attempt: success -> 2.1.187 (2026-07-02)" — i.e. the binary
installed the day of the regression is the one still running
- Auto-update channel was latest when it broke; switched to stable on 2026-07-03
(stable 2.1.191 / latest 2.1.199 not yet picked up — no restart since)
~/.claude/settings.json(user scope) has"defaultShell": "powershell"— set
2026-07-01 as the fix for a previous, separate !-path issue (see history below)
- Git Bash is installed (SHELL=/bin/bash.exe)
- All /doctor sections show OK; no errors flagged
Timeline
- 2026-07-01 — earlier distinct issue: with no
defaultShellset,!routed via
Git Bash and returned zero output (known Windows behaviour). Fixed by
"defaultShell": "powershell" + restart. ! then worked reliably, e.g.
! echo hello, ! node scripts/migrate.mjs ..., ! npm run deploy.
- 2026-07-02 ~18:51 —
! npm run deployran fine, full Wrangler output captured
in the conversation.
- 2026-07-02 ~19:15 — same-shape
! npm ...command: console flicker, no output,
nothing captured. No settings, PATH, or machine changes in between. An auto-update
ran mid-day (per /doctor above).
- 2026-07-03 — machine ruled out: the identical npm command runs fine in a plain
powershell -NoProfile window. Claude Code's internal Bash and PowerShell tools also
run npm fine. Only the ! prompt layer fails.
- 2026-07-03 (after /doctor, retest) —
! npm --version->11.13.0, works again.
Same binary (2.1.187), same session, no settings changes since the breakage. The
failure window was roughly 2026-07-02 ~19:15 to sometime before this retest.
Version telemetry note
Session notes from 2026-07-02 recorded the post-update version as 2.1.198 (what thelatest channel advertised at the time), but /doctor on 2026-07-03 reports the running
binary as 2.1.187 with the last successful update dated 2026-07-02. Including both
since they disagree; the binary that actually landed on 2026-07-02 — and is still
running — reports 2.1.187.
Expected vs actual
- Expected:
! <command>runs in the configured default shell (PowerShell) and
streams output back into the conversation.
- Actual: brief console-window flicker, no output, no error, nothing enters the
conversation.
Repro
Not currently reproducible (see timeline — the same command now works on the same
binary and session). During the failure window: type any ! <command> (e.g.! npm --version) -> flicker + no output, no error, nothing enters the conversation.
Possibly related
/doctoritself would not run over Remote Control (claude.ai/code remote session);
it only ran from the desktop terminal. May be intended, noting it in case it isn't.