[BUG] Claude Code VS Code extension keeps showing “requires git-bash” on Windows even though Git Bash + env var are correctly set

Status Closed — not planned
Maintainer reply None cached
Activity 11 comments · opened Nov 20, 2025 · closed Feb 14, 2026

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

  1. Open VSCode
  2. 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_

View original on GitHub ↗

11 Comments

github-actions[bot] · 9 months ago

Found 3 possible duplicate issues:

  1. https://github.com/anthropics/claude-code/issues/8674
  2. https://github.com/anthropics/claude-code/issues/11496
  3. https://github.com/anthropics/claude-code/issues/9883

This issue will be automatically closed as a duplicate in 3 days.

  • If your issue is a duplicate, please close it and 👍 the existing issue instead
  • To prevent auto-closure, add a comment or 👎 this comment

🤖 Generated with Claude Code

lenouar-uae · 9 months ago

Adding C:\Windows\System32\ to the system PATH has resolved my issue.
Thanks

zeng-gq · 9 months ago

@lenouar-uae 太不可思议了,这种方式竟然解决了。我真的等了好多天,用了很长一段时间的终端模式,直到不知道什么原因终端模式也无法使用,我再次来到这里蹲一个解决方案。

Avilianb · 8 months ago
Adding C:\Windows\System32\ to the system PATH has resolved my issue. Thanks

这太神奇了 我找了好久,甚至在json里编辑了变量

asterkin · 8 months ago

Still does not work with recent update to 2.0.70

milo2112 · 8 months ago

@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

asterkin · 8 months ago

Incredible! C:\Windows\System32\ solves the problem.

github-actions[bot] · 7 months ago

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.

github-actions[bot] · 6 months ago

Closing for now — inactive for too long. Please open a new issue if this is still relevant.

leibnitz27 · 6 months ago

Yes, adding c:\windows\system32 fixed this (thanks @Avilianb ) but COME ON GUYS. Don't close this issue. It's still live.

github-actions[bot] · 6 months ago

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.