VS Code panel: "requires git-bash" error even when git and bash are in PATH (Windows)
Resolved 💬 3 comments Opened Feb 13, 2026 by KPMTGG Closed Feb 13, 2026
Bug Description
The VS Code extension panel fails to start on Windows 11 with:
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 even when:
C:\Program Files\Git\cmdis in the system PATHC:\WINDOWS\system32is in the system PATHCLAUDE_CODE_GIT_BASH_PATHis set as a system environment variablewhere.exe gitsucceeds in PowerShell- The CLI works perfectly (bash detection works fine)
Root Cause
In extension.js, the function SD6() calls:
spawnSync("where.exe", ["git"], { stdio: "pipe", encoding: "utf8" })
without shell: true. Node.js spawnSync on Windows without the shell option can fail to resolve executables via PATH, even when C:\WINDOWS\system32 (containing where.exe) and C:\Program Files\Git\cmd (containing git.exe) are both in the system PATH.
This check is also redundant — the CLI process already has its own working bash/git detection.
Suggested Fix
Either:
- Remove the
SD6()check entirely (the CLI already handles bash/git detection) - Add
shell: trueto the spawnSync options - Use the full path
C:\Windows\System32\where.exe
Workaround
Patch extension.js: add return; at the start of the SD6() function body to skip the broken check.
Environment
- Windows 11 Pro (10.0.26200)
- VS Code (latest)
- Claude Code extension v2.1.39 (win32-x64)
- Git for Windows installed at
C:\Program Files\Git C:\Program Files\Git\cmdandC:\WINDOWS\system32both in system PATHCLAUDE_CODE_GIT_BASH_PATHset toC:\Program Files\Git\bin\bash.exe
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗