Claude Code writes bash syntax under zsh: 51 failures per 1,000 Bash calls, 76% silent
stagefright5 · ghdev · 2026-10-17
Issue #103027 in anthropics/claude-code (a follow-up to #67146) quantifies Claude Code writing bash-style commands while the Bash tool runs under zsh on macOS, using roughly 12 weeks of the author's own transcripts.
Measurements (Jul 28 – Oct 17, 2026, Claude Code 2.1.x, mostly Opus 5.5)
- 287 sessions, 61,040 Bash calls, 2,570 calls containing a zsh error line ((eval):N: …), subagent transcripts included
- Failure rate rose 3.5×: 14.7 per 1,000 calls from Jul 28 to Sep 20, then 51.3 per 1,000 from Sep 21 to Oct 17
- 76% were silent: the call still exited 0, leaving the error buried mid-output
- 87% were repeats of a slip type the same session had already hit
- Claude blamed zsh in only 82 replies, about 3% of slips
- Direct cost was small ($53 at API list prices, 0.7% of spend, 71 minutes of model time); the bigger risk is Claude drawing conclusions from silently incomplete output
Dominant failure patterns
- Unquoted glob in a flag value (1,296): e.g. grep -rn foo src --include=.ts expands against the cwd and aborts with no matches found
- Unmatched path glob (656): e.g. ls libs//README.md aborts instead of passing the pattern through
- = word expansion (549): echo ==== as a separator triggers =cmd expansion and === not found
- Unsplit variable (28, usually silent): G="git -C repo"; $G log passes one argument in zsh
- Colon modifiers (21): git show $B:shared/package.json gets :s/:t/:h/:r treated as history modifiers, mangling ref:path
- Array subscript (7): grep -oE "$pat[^};]" is read as a subscript on $pat
- Bash-only expansion (2): ${!v} yields bad substitution
More from coding & agent
- Hallmark v2 questioned: how does it check taste without a human looking? — petrusenko_max · 2026-10-23
- Laude Institute launches FrontierCS 2: agents must beat deleted paper contributions blind — lateinteraction · 2026-10-23
- Index Network open-sources Social Discovery Protocol: agents negotiate fit on your behalf — carsonfarmer · 2026-10-23
- Installed a formal-verification skill: it silently installed Java, MacBook runs 10 degrees hotter — zealcaiden · 2026-10-23
- OPAL: an LLM agent rewrites the optimizer's source code during training — RobertTLange · 2026-10-23
- OpenAI's Decisions API hits GA: near real-time routing up to 10x faster than GPT-6 Luna — OpenAIDevs · 2026-10-23