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\cmd is in the system PATH
  • C:\WINDOWS\system32 is in the system PATH
  • CLAUDE_CODE_GIT_BASH_PATH is set as a system environment variable
  • where.exe git succeeds 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:

  1. Remove the SD6() check entirely (the CLI already handles bash/git detection)
  2. Add shell: true to the spawnSync options
  3. 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\cmd and C:\WINDOWS\system32 both in system PATH
  • CLAUDE_CODE_GIT_BASH_PATH set to C:\Program Files\Git\bin\bash.exe

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗