Preflight Checklist
What's Wrong?
[BUG] Claude Code VS Code Extension Fails to Detect Git Bash on Windows Despite Correct Configuration
Environment
- Platform: Anthropic API
- Claude Code Extension Version: 2.0.2 (released 2025-10-01)
- Operating System: Windows 11
- VS Code Version: [Please fill in your version from Help → About]
- Terminal: PowerShell 5.x with Python virtual environment
- Git Version: 2.50.0.windows.2
Bug Description
The Claude Code VS Code extension consistently fails to detect Git Bash installation on Windows, displaying the error:
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
This occurs despite:
- Git Bash being properly installed and functional
- Correct environment variable configuration
- Bash executable being accessible and working
- Multiple troubleshooting attempts including path modifications
Steps to Reproduce
- Install Git for Windows with Git Bash
- Install Claude Code VS Code extension (version 2.0.2)
- Verify Git Bash works:
& "C:\Program Files\Git\bin\bash.exe" --version
- Set environment variable:
$env:CLAUDE_CODE_GIT_BASH_PATH = "C:\Program Files\Git\bin\bash.exe"
- Attempt to use Claude Code extension in VS Code
- Observe the git-bash error despite correct configuration
Expected Behavior
The extension should detect Git Bash either through:
- Automatic detection from system PATH
- Environment variable
CLAUDE_CODE_GIT_BASH_PATH
- VS Code terminal environment settings
Actual Behavior
Extension displays git-bash error and refuses to function, blocking all productivity workflows.
Troubleshooting Attempts Made
Environment Variable Configuration
- Set both user and system environment variables
- Tried both
C:\Program Files\Git\bin\bash.exe and space-free symbolic link C:\GitBash\bin\bash.exe
- Verified variables are visible in VS Code terminal sessions
- Added to VS Code settings.json
terminal.integrated.env.windows
PATH Configuration
- Added
C:\Program Files\Git\bin to system PATH
- Added
C:\Program Files\Git\cmd to system PATH
- Verified
git --version works (showing PATH is functional)
- Created symbolic link without spaces:
C:\GitBash → C:\Program Files\Git
Extension Troubleshooting
- Downgraded from version 2.0.2 to 2.0.1 (same error)
- Completely uninstalled and reinstalled extension
- Reloaded VS Code window multiple times
- Restarted VS Code completely
- Cleared VS Code settings and reconfigured
Terminal Configuration
- Tested with PowerShell, Command Prompt, and Git Bash terminals
- Changed VS Code default terminal profile
- Verified bash works in all terminal types
Verification Commands That Work
All of these commands execute successfully, proving the installation is correct:
# Direct execution
& "C:\Program Files\Git\bin\bash.exe" --version
# Output: GNU bash, version 5.2.37(1)-release (x86_64-pc-msys)
# Environment variable execution
& $env:CLAUDE_CODE_GIT_BASH_PATH --version
# Output: GNU bash, version 5.2.37(1)-release (x86_64-pc-msys)
# Git command works
git --version
# Output: git version 2.50.0.windows.2
# Environment variable is set
echo $env:CLAUDE_CODE_GIT_BASH_PATH
# Output: C:\Program Files\Git\bin\bash.exe
Related Issues
This appears related to known issues with Git Bash path detection:
Impact
This bug completely blocks the use of Claude Code VS Code extension, preventing:
- Integrated AI-assisted coding workflows
- Real-time code editing and suggestions
- File management through the extension
- All productivity features that require the extension
The CLI version works but lacks the integrated VS Code experience needed for effective development workflow.
System Configuration Details
# Working Git installation
PS> git --version
git version 2.50.0.windows.2
# Working Bash installation
PS> & "C:\Program Files\Git\bin\bash.exe" --version
GNU bash, version 5.2.37(1)-release (x86_64-pc-msys)
# Correct environment variable
PS> $env:CLAUDE_CODE_GIT_BASH_PATH
C:\Program Files\Git\bin\bash.exe
# PATH includes Git
PS> $env:PATH -split ';' | Where-Object { $_ -like "*Git*" }
C:\Program Files\Git\cmd
Request
This issue is blocking productive use of Claude Code for software development. Please prioritize fixing the VS Code extension's Git Bash detection mechanism on Windows, particularly:
- Proper handling of paths with spaces (Program Files)
- Reliable environment variable detection
- Fallback detection methods when automatic detection fails
Additional Information
Available for testing any proposed fixes or providing additional diagnostic information as needed.
What Should Happen?
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
Error Messages/Logs
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
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
Claude Model
None
Is this a regression?
Yes, this worked in a previous version
Last Working Version
No response
Claude Code Version
2.0.2
Platform
Anthropic API
Operating System
Windows
Terminal/Shell
PowerShell
Additional Information
No response
Preflight Checklist
What's Wrong?
[BUG] Claude Code VS Code Extension Fails to Detect Git Bash on Windows Despite Correct Configuration
Environment
Bug Description
The Claude Code VS Code extension consistently fails to detect Git Bash installation on Windows, displaying the error:
This occurs despite:
Steps to Reproduce
& "C:\Program Files\Git\bin\bash.exe" --version$env:CLAUDE_CODE_GIT_BASH_PATH = "C:\Program Files\Git\bin\bash.exe"Expected Behavior
The extension should detect Git Bash either through:
CLAUDE_CODE_GIT_BASH_PATHActual Behavior
Extension displays git-bash error and refuses to function, blocking all productivity workflows.
Troubleshooting Attempts Made
Environment Variable Configuration
C:\Program Files\Git\bin\bash.exeand space-free symbolic linkC:\GitBash\bin\bash.exeterminal.integrated.env.windowsPATH Configuration
C:\Program Files\Git\binto system PATHC:\Program Files\Git\cmdto system PATHgit --versionworks (showing PATH is functional)C:\GitBash→C:\Program Files\GitExtension Troubleshooting
Terminal Configuration
Verification Commands That Work
All of these commands execute successfully, proving the installation is correct:
Related Issues
This appears related to known issues with Git Bash path detection:
Program Files) #4507: Git Bash path with spaces in "Program Files"Impact
This bug completely blocks the use of Claude Code VS Code extension, preventing:
The CLI version works but lacks the integrated VS Code experience needed for effective development workflow.
System Configuration Details
Request
This issue is blocking productive use of Claude Code for software development. Please prioritize fixing the VS Code extension's Git Bash detection mechanism on Windows, particularly:
Additional Information
Available for testing any proposed fixes or providing additional diagnostic information as needed.
What Should Happen?
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
Error Messages/Logs
Steps to Reproduce
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
Claude Model
None
Is this a regression?
Yes, this worked in a previous version
Last Working Version
No response
Claude Code Version
2.0.2
Platform
Anthropic API
Operating System
Windows
Terminal/Shell
PowerShell
Additional Information
No response