[BUG] VS Code extension fails to detect git-bash on Windows despite correct configuration

Resolved 💬 3 comments Opened Dec 6, 2025 by almusanid Closed Dec 6, 2025

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?

The Claude Code VS Code extension fails to launch with the error "Claude Code on Windows requires git-bash" despite having Git Bash properly installed and configured through
multiple documented methods.

The extension logs show it fails when trying to "load config cache" and "spawn Claude":

  • [error] Failed to load config cache: Error: Claude Code on Windows requires git-bash
  • [error] Error spawning Claude (on channel ...): Error: Claude Code on Windows requires git-bash

The extension is not reading the bash path from:

  1. CLAUDE_CODE_GIT_BASH_PATH environment variable (set at both system and user level)
  2. ~/.claude/settings.json file with env configuration
  3. Project-level .claude/settings.json file
  4. VS Code setting claudeCode.gitBashPath

Note: The Claude Code CLI works fine from the terminal, only the VS Code extension fails.

What Should Happen?

The VS Code extension should detect Git Bash from at least one of the documented configuration methods:

  1. The CLAUDE_CODE_GIT_BASH_PATH environment variable
  2. The ~/.claude/settings.json file with env.CLAUDE_CODE_GIT_BASH_PATH setting
  3. Project .claude/settings.json file
  4. VS Code setting claudeCode.gitBashPath

The extension should successfully spawn the Claude process and allow normal operation.

Error Messages/Logs

2025-12-06 14:55:06.173 [info] Loading config cache by launching Claude...
  2025-12-06 14:55:06.173 [error] Failed to load config cache: 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
  2025-12-06 14:55:06.173 [error] Error processing client request: 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
  2025-12-06 14:55:06.174 [info] Received message from webview:
  {"type":"launch_claude","channelId":"4cjmkdvqtkh","cwd":"c:\\Users\\qassu\\Wasfaty","model":"default","permissionMode":"default","thinkingLevel":"off"}
  2025-12-06 14:55:06.190 [info] Launching Claude on channel: 4cjmkdvqtkh
  2025-12-06 14:55:06.190 [info] Closing Claude on channel: 4cjmkdvqtkh
  2025-12-06 14:55:06.190 [error] Error spawning Claude (on channel 4cjmkdvqtkh): 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. Install Git for Windows with Git Bash at C:\Program Files\Git\bin\bash.exe
  2. Verify bash works: Run "C:\Program Files\Git\bin\bash.exe" --version (works correctly)
  3. Set environment variable at system level:

```powershell
[Environment]::SetEnvironmentVariable('CLAUDE_CODE_GIT_BASH_PATH', 'C:\Program Files\Git\bin\bash.exe', 'Machine')

  1. Create ~/.claude/settings.json:

{
"env": {
"CLAUDE_CODE_GIT_BASH_PATH": "C:\\Program Files\\Git\\bin\\bash.exe"
}
}

  1. Add VS Code setting in settings.json:

{
"claudeCode.gitBashPath": "C:\\Program Files\\Git\\bin\\bash.exe"
}

  1. Install Claude Code VS Code extension
  2. Restart VS Code completely (close all windows, check Task Manager)
  3. Open Claude Code extension panel
  4. Try to start a conversation

Result: Extension fails with "Claude Code on Windows requires git-bash" error

Note: Running claude from the VS Code integrated terminal (Git Bash) works fine, only the extension fails.

Claude Model

None

Is this a regression?

I don't know

Last Working Version

_No response_

Claude Code Version

2.0.60

Platform

Anthropic API

Operating System

Windows

Terminal/Shell

Other

Additional Information

_No response_

View original on GitHub ↗

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