Skip to content

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

Description

@almusanid

Preflight Checklist

  • I have searched existing issues and this hasn't been reported yet
  • This is a single bug report (please file separate reports for different bugs)
  • 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:
    [Environment]::SetEnvironmentVariable('CLAUDE_CODE_GIT_BASH_PATH', 'C:\Program Files\Git\bin\bash.exe', 'Machine')
  4. Create ~/.claude/settings.json:
    {
    "env": {
    "CLAUDE_CODE_GIT_BASH_PATH": "C:\Program Files\Git\bin\bash.exe"
    }
    }
  5. Add VS Code setting in settings.json:
    {
    "claudeCode.gitBashPath": "C:\Program Files\Git\bin\bash.exe"
    }
  6. Install Claude Code VS Code extension
  7. Restart VS Code completely (close all windows, check Task Manager)
  8. Open Claude Code extension panel
  9. 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:idebugSomething isn't workinghas reproHas detailed reproduction stepsplatform:windowsIssue specifically occurs on Windows

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions