[BUG] Claude Code VS Code extension keeps showing “requires git-bash” on Windows even though Git Bash + env var are correctly set
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?
– OS: Windows 10/11 (64-bit)
– Git Bash installed at C:\Program Files\Git\bin\bash.exe
– Windows environment variable CLAUDE_CODE_GIT_BASH_PATH is set at System level to that exact path
– In a fresh VS Code terminal I can run:
git --version → git version 2.51.2.windows.1
bash --version → GNU bash, version 5.2.37(1)
echo $env:CLAUDE_CODE_GIT_BASH_PATH → C:\Program Files\Git\bin\bash.exe
claude --version → 2.0.47 (Claude Code)
– I fully removed the extension (.vscode/extensions + Code/User/globalStorage entries) and reinstalled it.
– I also tested with a fresh VS Code profile (renamed %APPDATA%\Code and let VS Code recreate it).
– Despite all this, the Claude Code panel still shows:
“Error: Claude Code on Windows requires git-bash… If installed but not in PATH, set environment variable CLAUDE_CODE_GIT_BASH_PATH=C:\Program Files\Git\bin\bash.exe”
– On another PC with the same Git + env var config, the extension works fine.
It looks like the extension’s Git Bash detection is failing on this Windows install even when CLAUDE_CODE_GIT_BASH_PATH is correct and Git Bash is executable from the VS Code terminal. Happy to share logs from View → Output → Claude Code if that helps.
What Should Happen?
It should start accepting prompts
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
- Open VSCode
- Open Claude Extension dialog
Claude Model
None
Is this a regression?
Yes, this worked in a previous version
Last Working Version
_No response_
Claude Code Version
2.0.47 (Claude Code)
Platform
Anthropic API
Operating System
Windows
Terminal/Shell
VS Code integrated terminal
Additional Information
_No response_
11 Comments
Found 3 possible duplicate issues:
This issue will be automatically closed as a duplicate in 3 days.
🤖 Generated with Claude Code
Adding C:\Windows\System32\ to the system PATH has resolved my issue.
Thanks
@lenouar-uae 太不可思议了,这种方式竟然解决了。我真的等了好多天,用了很长一段时间的终端模式,直到不知道什么原因终端模式也无法使用,我再次来到这里蹲一个解决方案。
这太神奇了 我找了好久,甚至在json里编辑了变量
Still does not work with recent update to 2.0.70
@lenouar-uae
It was as simple as you said.
I spent weeks trying different methods: installing and uninstalling the extension, reviewing the code in the extension.js file in VS Code and how it performs the search for bash.exe, but nothing worked.
Until I saw your simple solution.
Thank you
Incredible! C:\Windows\System32\ solves the problem.
This issue has been inactive for 30 days. If the issue is still occurring, please comment to let us know. Otherwise, this issue will be automatically closed in 30 days for housekeeping purposes.
Closing for now — inactive for too long. Please open a new issue if this is still relevant.
Yes, adding c:\windows\system32 fixed this (thanks @Avilianb ) but COME ON GUYS. Don't close this issue. It's still live.
This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.