[ Bash shell crashes on every invocation on Windows — MSYS2 fatal error (exit code 3221225477)]
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?
Every Bash tool call from Claude Code crashes immediately with a fatal MSYS2 error. The shell never executes any command — it fails on startup. All file tools (Read, Write, Edit, Grep, Glob) work fine, but nothing requiring shell execution works.
Error output:
Exit code 3221225477
1 [main] bash (10644) C:\Program Files\Git\bin\..\usr\bin\bash.exe: *** fatal error - add_item ("\??\C:\Program
Files\Git", "/", ...) failed, errno 1
What Should Happen?
The Bash shell should execute commands successfully, OR the CLAUDE_CODE_SHELL environment variable should be respected
so users can configure PowerShell as a fallback shell on Windows.
Error Messages/Logs
Steps to Reproduce
Steps to Reproduce (clear and replace):
- Install Claude Code on Windows 11 with Git Bash as the shell
- Start a Claude Code session
- Ask Claude to run any shell command (e.g., "run glab --version")
- Observe the Bash tool call crash immediately with exit code 3221225477
Claude Model
Sonnet (default)
Is this a regression?
Yes, this worked in a previous version
Last Working Version
2.1.63
Claude Code Version
2.1.63
Platform
Anthropic API
Operating System
Windows
Terminal/Shell
Windows Terminal
Additional Information
_No response_
This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗