While I was counting Claude Code on zsh failures for this post, the agent failed in the exact way I was counting. It ran a grep over my blog folder and got this back:
(eval):1: no matches found: --include=*.md
Enter fullscreen mode
Exit fullscreen mode
The grep never ran. The next command in the script did, so the call looked fine.
An agent with bash habits is typing into a shell that isn't bash. I parsed 32 days of my own session logs to see what that costs. 7,795 of 166,430 Bash commands hit an error that only zsh produces, and 5,559 of those still came back as a success.
TL;DR
4.7% of my Claude Code Bash calls (7,795 of 166,430) hit a zsh-only expansion error. 71% of those exited 0, so an exit-code dashboard misses them.
Unquoted grep --include=*.ts accounted for 4,489 calls. zsh refuses the glob, so grep never starts.
Unquoted echo ====== accounted for 1,973 calls and 34.7% of all my non-zero exits.…