[BUG] Bash tool silently fails for basic commands on Windows (regression in 2.1.45)
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?
Basic bash commands (echo, pwd, ls, mkdir, cat) fail silently in Claude Code on Windows. They return exit code 1 with zero output (no stdout, no stderr). Only git
and python commands work — everything else is dead.
This broke overnight between 2.1.44 and 2.1.45. Plugins relying on bash scripts (like ralph-loop) are completely non-functional.
What Should Happen?
All standard bash commands (echo, pwd, ls, mkdir, cat, bash) should execute normally and return their output, as they did in 2.1.44. Bash plugins that invoke
shell scripts should work without silent failures.
Error Messages/Logs
# Running: echo testing
# Result: exit code 1, completely empty output (no stdout, no stderr)
# Running: pwd
# Result: exit code 1, completely empty output
# Running: ls -la tmp/
# Result: exit code 2, completely empty output
# Running: git status
# Result: exit code 0, works correctly with full output
# Plugin ralph-loop error when invoking its bash setup script:
Error: Bash command failed for pattern "!
"C:/Users/XXX/.claude/plugins/cache/claude-plugins-official/ralph-loop/261ce4fba4f2/scripts/setup-ralph-loop.sh" 'prompt text' --max-iterations 100
--completion-promise 'ALL_PRS_PROCESSED'
":
Note: the error message after the colon is completely empty — no indication of what went wrong.
Steps to Reproduce
- Install Claude Code 2.1.45 on Windows 11
- Open Claude Code in any git repository
- Try running basic bash commands:
echo test
Expected: prints "test", exit code 0
Actual: exit code 1, no output
pwd
Expected: prints working directory, exit code 0
Actual: exit code 1, no output
ls
Expected: lists directory contents, exit code 0
Actual: exit code 2, no output
- Compare with git commands that DO work:
git status
git log --oneline -3
These return correct output with exit code 0.
Environment:
- Windows 11 Pro 10.0.26200
- Shell: Git Bash (C:\Program Files\Git\usr\bin\bash.exe)
- Claude Code 2.1.45
- Worked correctly in previous version (auto-updated overnight)
Claude Model
Opus
Is this a regression?
Yes, this worked in a previous version
Last Working Version
Unknown exact version. Last working: 2026-02-17. Both Claude Code and the ralph-loop plugin updated overnight (plugin cache changed from 2cd88e7947b7 to 261ce4fba4f2). The issue may be related to either the Claude Code update (now 2.1.45) or a change in how the Bash tool handles commands on Windows. Basic bash builtins like echo fail, suggesting it's a Claude Code issue rather than a plugin issue.
Claude Code Version
2.1.45
Platform
Anthropic API
Operating System
Windows
Terminal/Shell
Windows Terminal
Additional Information
Key observation: Only commands that resolve to standalone .exe files work (git.exe, python.exe). Bash builtins and MSYS2/Git Bash utilities (echo, pwd, ls, mkdir,
cat) all fail silently. This suggests Claude Code may have changed how it invokes the shell on Windows — possibly bypassing Git Bash and using cmd.exe or a
minimal shell that doesn't have these commands.
Permission settings do not help: Adding Bash(echo:), Bash(pwd:) etc. to .claude/settings.json allow list has no effect. The commands still fail.
Workaround: Running Claude Code from WSL works correctly.
Shell config:
$ git --exec-path
C:/Program Files/Git/mingw64/libexec/git-core
$ where bash
C:\Program Files\Git\usr\bin\bash.exe
C:\Windows\System32\bash.exe
Note: C:\Windows\System32\bash.exe is the WSL launcher. If Claude Code accidentally picks up this bash instead of Git Bash, it would explain why standalone
executables work (they're in Windows PATH) but bash builtins/utilities don't (WSL bash can't access Windows filesystem paths properly).
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗