[BUG] VS Code Extension ignores CLAUDE_CODE_GIT_BASH_PATH environment variable on Windows
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?
The Claude Code VS Code extension on Windows throws a git-bash error and refuses to launch, even though Git Bash is installed, bash.exe exists at the expected path (C:\Program Files\Git\bin\bash.exe), and the CLAUDE_CODE_GIT_BASH_PATH environment variable is set correctly. The extension completely ignores all configuration and fails immediately on activation.
What Should Happen?
The extension should detect the existing bash.exe at C:\Program Files\Git\bin\bash.exe and launch successfully. Alternatively, it should respect the CLAUDE_CODE_GIT_BASH_PATH environment variable when set.
Error Messages/Logs
2026-03-13 11:26:48.248 [info] Claude code extension is now active?
2026-03-13 11:26:48.248 [info] MCP Server running on port 10200 (localhost only)
2026-03-13 11:26:48.248 [info] AuthManager initialized
2026-03-13 11:26:48.248 [error] Failed to load config cache: Error: Claude Code on Windows requires git-bash (https://git-scm.com/downloads/win). If installed but not in PATH, set environment variable pointing to your bash.exe, similar to: CLAUDE_CODE_GIT_BASH_PATH=C:\Program Files\Git\bin\bash.exe
2026-03-13 11:26:48.248 [error] Error processing client request: Error: Claude Code on Windows requires git-bash (https://git-scm.com/downloads/win). If installed but not in PATH, set environment variable pointing to your bash.exe, similar to: CLAUDE_CODE_GIT_BASH_PATH=C:\Program Files\Git\bin\bash.exe
2026-03-13 11:26:48.249 [error] Error spawning Claude (on channel 2y6cvk1wo5h): Error: Claude Code on Windows requires git-bash (https://git-scm.com/downloads/win). If installed but not in PATH, set environment variable pointing to your bash.exe, similar to: CLAUDE_CODE_GIT_BASH_PATH=C:\Program Files\Git\bin\bash.exe
Steps to Reproduce
Steps to Reproduce
Install Git for Windows from https://git-scm.com/downloads/win (includes Git Bash)
Install Claude Code VS Code extension
Verify bash.exe exists at C:\Program Files\Git\bin\bash.exe — it does
Set CLAUDE_CODE_GIT_BASH_PATH as a Windows System Environment Variable pointing to C:\Program Files\Git\usr\bin\bash.exe
Also add to VS Code settings.json:
json"terminal.integrated.env.windows": {
"CLAUDE_CODE_GIT_BASH_PATH": "C:\\Program Files\\Git\\usr\\bin\\bash.exe"
},
"claudeCode.gitBashPath": "C:\\Program Files\\Git\\usr\\bin\\bash.exe"
Fully restart PC
Open VS Code and launch Claude Code panel
Error appears immediately
Verification that bash works fine:
$ "C:\Program Files\Git\bin\bash.exe" --version
GNU bash, version 5.2.37(1)-release (x86_64-pc-msys)
$ "C:\Program Files\Git\bin\bash.exe" -c "echo works"
works
Note: Running claude directly from a Git Bash terminal works perfectly. Issue is only with the VS Code extension.
Claude Model
None
Is this a regression?
No, this never worked
Last Working Version
Unknown — first time installing the extension on this machine
Claude Code Version
2.1.74 (Claude Code)
Platform
Other
Operating System
Windows
Terminal/Shell
Other
Additional Information
Git Bash (MINGW64)
Additional Information
Tried all of the following with no success:
Setting CLAUDE_CODE_GIT_BASH_PATH via setx command in Git Bash terminal
Setting it in Windows System Environment Variables (System-level, not just User)
Setting terminal.integrated.env.windows in VS Code settings.json
Setting claudeCode.gitBashPath in VS Code settings.json
Full PC restart after every attempt
The extension appears to completely ignore the CLAUDE_CODE_GIT_BASH_PATH environment variable regardless of how it is set.
This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗