[BUG] VS Code extension fails to detect git-bash on Windows despite correct configuration
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 fails to launch with the error "Claude Code on Windows requires git-bash" despite having Git Bash properly installed and configured through
multiple documented methods.
The extension logs show it fails when trying to "load config cache" and "spawn Claude":
[error] Failed to load config cache: Error: Claude Code on Windows requires git-bash[error] Error spawning Claude (on channel ...): Error: Claude Code on Windows requires git-bash
The extension is not reading the bash path from:
CLAUDE_CODE_GIT_BASH_PATHenvironment variable (set at both system and user level)~/.claude/settings.jsonfile with env configuration- Project-level
.claude/settings.jsonfile - VS Code setting
claudeCode.gitBashPath
Note: The Claude Code CLI works fine from the terminal, only the VS Code extension fails.
What Should Happen?
The VS Code extension should detect Git Bash from at least one of the documented configuration methods:
- The
CLAUDE_CODE_GIT_BASH_PATHenvironment variable - The
~/.claude/settings.jsonfile withenv.CLAUDE_CODE_GIT_BASH_PATHsetting - Project
.claude/settings.jsonfile - VS Code setting
claudeCode.gitBashPath
The extension should successfully spawn the Claude process and allow normal operation.
Error Messages/Logs
2025-12-06 14:55:06.173 [info] Loading config cache by launching Claude...
2025-12-06 14:55:06.173 [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
2025-12-06 14:55:06.173 [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
2025-12-06 14:55:06.174 [info] Received message from webview:
{"type":"launch_claude","channelId":"4cjmkdvqtkh","cwd":"c:\\Users\\qassu\\Wasfaty","model":"default","permissionMode":"default","thinkingLevel":"off"}
2025-12-06 14:55:06.190 [info] Launching Claude on channel: 4cjmkdvqtkh
2025-12-06 14:55:06.190 [info] Closing Claude on channel: 4cjmkdvqtkh
2025-12-06 14:55:06.190 [error] Error spawning Claude (on channel 4cjmkdvqtkh): 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
- Install Git for Windows with Git Bash at
C:\Program Files\Git\bin\bash.exe - Verify bash works: Run
"C:\Program Files\Git\bin\bash.exe" --version(works correctly) - Set environment variable at system level:
```powershell
[Environment]::SetEnvironmentVariable('CLAUDE_CODE_GIT_BASH_PATH', 'C:\Program Files\Git\bin\bash.exe', 'Machine')
- Create ~/.claude/settings.json:
{
"env": {
"CLAUDE_CODE_GIT_BASH_PATH": "C:\\Program Files\\Git\\bin\\bash.exe"
}
}
- Add VS Code setting in settings.json:
{
"claudeCode.gitBashPath": "C:\\Program Files\\Git\\bin\\bash.exe"
}
- Install Claude Code VS Code extension
- Restart VS Code completely (close all windows, check Task Manager)
- Open Claude Code extension panel
- Try to start a conversation
Result: Extension fails with "Claude Code on Windows requires git-bash" error
Note: Running claude from the VS Code integrated terminal (Git Bash) works fine, only the extension fails.
Claude Model
None
Is this a regression?
I don't know
Last Working Version
_No response_
Claude Code Version
2.0.60
Platform
Anthropic API
Operating System
Windows
Terminal/Shell
Other
Additional Information
_No response_
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗