[BUG] Claude Code constructs invalid bash.exe path on Windows: usr\bin\..\usr\bin\bash.exe
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?
Environment
- OS: Windows 10/11
- Git version: 2.54.0.windows.1
- Claude Code version: 2.1.89
- bash.exe locations:
C:\Program Files\Git\bin\bash.exe
C:\Program Files\Git\usr\bin\bash.exe
Problem
Claude Code constructs an invalid bash path:
C:\Program Files\Git\usr\bin\..\usr\bin\bash.exe
This path does not exist and causes all Bash tool calls to fail.
Expected
Claude Code should use:
C:\Program Files\Git\usr\bin\bash.exe
OR
C:\Program Files\Git\bin\bash.exe
Workaround
Running deploy.ps1 manually in PowerShell works correctly.
Setting CLAUDE_CODE_GIT_BASH_PATH environment variable does NOT fix the issue.
The settings.json env variable is also ignored.
Impact
All Bash tool commands fail. Claude Code cannot automate deployments on Windows.
What Should Happen?
Environment
- OS: Windows 10/11
- Git version: 2.54.0.windows.1
- Claude Code version: 2.1.89
- bash.exe locations:
C:\Program Files\Git\bin\bash.exe
C:\Program Files\Git\usr\bin\bash.exe
Problem
Claude Code constructs an invalid bash path:
C:\Program Files\Git\usr\bin\..\usr\bin\bash.exe
This path does not exist and causes all Bash tool calls to fail.
Expected
Claude Code should use:
C:\Program Files\Git\usr\bin\bash.exe
OR
C:\Program Files\Git\bin\bash.exe
Workaround
Running deploy.ps1 manually in PowerShell works correctly.
Setting CLAUDE_CODE_GIT_BASH_PATH environment variable does NOT fix the issue.
The settings.json env variable is also ignored.
Impact
All Bash tool commands fail. Claude Code cannot automate deployments on Windows.
Error Messages/Logs
## Environment
- OS: Windows 10/11
- Git version: 2.54.0.windows.1
- Claude Code version: 2.1.89
- bash.exe locations:
C:\Program Files\Git\bin\bash.exe
C:\Program Files\Git\usr\bin\bash.exe
## Problem
Claude Code constructs an invalid bash path:
C:\Program Files\Git\usr\bin\..\usr\bin\bash.exe
This path does not exist and causes all Bash tool calls to fail.
## Expected
Claude Code should use:
C:\Program Files\Git\usr\bin\bash.exe
OR
C:\Program Files\Git\bin\bash.exe
## Workaround
Running deploy.ps1 manually in PowerShell works correctly.
Setting CLAUDE_CODE_GIT_BASH_PATH environment variable does NOT fix the issue.
The settings.json env variable is also ignored.
## Impact
All Bash tool commands fail. Claude Code cannot automate deployments on Windows.
Steps to Reproduce
Environment
- OS: Windows 10/11
- Git version: 2.54.0.windows.1
- Claude Code version: 2.1.89
- bash.exe locations:
C:\Program Files\Git\bin\bash.exe
C:\Program Files\Git\usr\bin\bash.exe
Problem
Claude Code constructs an invalid bash path:
C:\Program Files\Git\usr\bin\..\usr\bin\bash.exe
This path does not exist and causes all Bash tool calls to fail.
Expected
Claude Code should use:
C:\Program Files\Git\usr\bin\bash.exe
OR
C:\Program Files\Git\bin\bash.exe
Workaround
Running deploy.ps1 manually in PowerShell works correctly.
Setting CLAUDE_CODE_GIT_BASH_PATH environment variable does NOT fix the issue.
The settings.json env variable is also ignored.
Impact
All Bash tool commands fail. Claude Code cannot automate deployments on Windows.
Claude Model
Sonnet (default)
Is this a regression?
Yes, this worked in a previous version
Last Working Version
- Model: Claude Sonnet 4.6 - Model ID: claude-sonnet-4-6 - Platform: Claude Code CLI (desktop app, Windows 10 Pro 10.0.19045)
Claude Code Version
- Model: Claude Sonnet 4.6 - Model ID: claude-sonnet-4-6 - Platform: Claude Code CLI (desktop app, Windows 10 Pro 10.0.19045)
Platform
Anthropic API
Operating System
Windows
Terminal/Shell
PowerShell
Additional Information
- Model: Claude Sonnet 4.6
- Model ID: claude-sonnet-4-6
- Platform: Claude Code CLI (desktop app, Windows 10 Pro 10.0.19045)
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗