[BUG] [Windows] Git Bash connection drops intermittently during conversation
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?
Description
Claude Version 2.1.3 date: 01/09/26
Claude Code loses connection to Git Bash intermittently during conversations on Windows. The extension works correctly when first starting VSCode, but after some time during an active conversation, it fails with 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
The only way to recover is to restart VSCode completely. The issue then reoccurs after some time.
Environment
- OS: Windows 11
- VSCode Version: (latest)
- Claude Code Extension Version: (latest, no pending updates)
- Git for Windows: Installed at
C:\Program Files\Git
Configuration
I have configured the environment variable in all possible locations:
1. Windows User Environment Variable
CLAUDE_CODE_GIT_BASH_PATH=C:\Program Files\Git\bin\bash.exe
2. Windows System Environment Variable
CLAUDE_CODE_GIT_BASH_PATH=C:\Program Files\Git\bin\bash.exe
3. System PATH includes:
C:\Program Files\Git\binC:\Program Files\Git\cmd
4. VSCode settings.json:
"terminal.integrated.env.windows": {
"CLAUDE_CODE_GIT_BASH_PATH": "C:\\Program Files\\Git\\bin\\bash.exe"
},
"terminal.integrated.profiles.windows": {
"Git Bash": {
"path": "C:\\Program Files\\Git\\bin\\bash.exe",
"icon": "terminal-bash"
}
},
"terminal.integrated.defaultProfile.windows": "Git Bash",
"claudeCode.useTerminal": false,
"claudeCode.gitBashPath": "C:\\Program Files\\Git\\bin\\bash.exe"
Steps to Reproduce
Open VSCode on Windows with all the above configuration
Start a Claude Code conversation
Work normally for some time (varies)
The extension loses connection to Git Bash and shows the error
Only restarting VSCode fixes it temporarily
Expected Behavior
The connection to Git Bash should remain stable throughout the entire VSCode session.
Actual Behavior
The connection drops intermittently, requiring VSCode restart to recover. The conversation context is lost each time this happens.
Additional Notes
The issue is intermittent and timing is unpredictable
All configuration is correct and verified
Git Bash works perfectly when used directly outside VSCode
"Developer: Reload Window" does not always fix the issue
### What Should Happen?
Expected Behavior
The connection to Git Bash should remain stable throughout the entire VSCode session.
### Error Messages/Logs
```shell
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
View output logs · Troubleshooting resources
Steps to Reproduce
Steps to Reproduce
Open VSCode on Windows with all the above configuration
Start a Claude Code conversation
Work normally for some time (varies)
The extension loses connection to Git Bash and shows the error
Only restarting VSCode fixes it temporarily
Claude Model
None
Is this a regression?
Yes, this worked in a previous version
Last Working Version
2.1.3
Claude Code Version
2.1.3
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
Terminal.app (macOS)
Additional Information
_No response_
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗