[BUG] v2.1.69: Git Bash detection broken on Windows — fails even when running inside Git Bash

Resolved 💬 3 comments Opened Mar 5, 2026 by CanML Closed Mar 9, 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?

Environment

  • Claude Code version: 2.1.69 (native install)
  • Platform: Anthropic API
  • Operating System: Windows (PowerShell 7.5.4)
  • Terminal: PowerShell 7.5.4, Git Bash (GNU bash 5.2.26)
  • Git for Windows: Installed at default location (C:\Program Files\Git)

Bug Description

After updating Claude Code this morning to v2.1.69, Git Bash detection is completely broken. Claude Code cannot find Git Bash even when launched from inside Git Bash itself. Every documented configuration method fails — environment variable, settings.json, PATH, and short paths.

Reproduction Steps

  1. Install Git for Windows at default location (C:\Program Files\Git)
  2. Install Claude Code v2.1.69 via irm https://claude.ai/install.ps1 | iex
  3. Run claude doctor from any terminal

Expected Behavior

Claude Code should detect and use Git Bash at C:\Program Files\Git\bin\bash.exe.

Actual Behavior

Every invocation fails with:

Claude Code was unable to find CLAUDE_CODE_GIT_BASH_PATH path "C:\Program Files\Git\bin\bash.exe"

Or, when the env var is unset:

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

Critically, this occurs even when running claude doctor from inside Git Bash:

User@DESKTOP-D93FHU7 MINGW64 ~
$ claude doctor
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

What I've Tried (All Failed)

1. Environment variable — both \bin\ and \usr\bin\ paths

PS> [Environment]::SetEnvironmentVariable("CLAUDE_CODE_GIT_BASH_PATH", "C:\Program Files\Git\bin\bash.exe", "User")
PS> $env:CLAUDE_CODE_GIT_BASH_PATH = "C:\Program Files\Git\bin\bash.exe"
PS> claude update
Claude Code was unable to find CLAUDE_CODE_GIT_BASH_PATH path "C:\Program Files\Git\bin\bash.exe"

2. settings.json (~/.claude/settings.json)

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

Result: Same error.

3. 8.3 short path (eliminating spaces)

PS> Test-Path "C:\PROGRA~1\Git\bin\bash.exe"
True
PS> claude doctor
Claude Code was unable to find CLAUDE_CODE_GIT_BASH_PATH path "C:\PROGRA~1\Git\bin\bash.exe"

4. Adding Git\bin to PATH (bash.exe found first by where.exe)

PS> where.exe bash
C:\Program Files\Git\bin\bash.exe    # ← Found first
C:\Windows\System32\bash.exe
C:\Users\User\AppData\Local\Microsoft\WindowsApps\bash.exe

PS> claude doctor
Claude Code on Windows requires git-bash (https://git-scm.com/downloads/win)...

5. Removing all env vars and settings (letting auto-detection work)

PS> Remove-Item Env:\CLAUDE_CODE_GIT_BASH_PATH -ErrorAction SilentlyContinue
PS> [Environment]::SetEnvironmentVariable("CLAUDE_CODE_GIT_BASH_PATH", $null, "User")
PS> claude doctor
Claude Code on Windows requires git-bash (https://git-scm.com/downloads/win)...

6. Clean reinstall

PS> irm https://claude.ai/install.ps1 | iex
Setting up Claude Code...
Claude Code was unable to find CLAUDE_CODE_GIT_BASH_PATH path "C:\Program Files\Git\bin\bash.exe"
✅ Installation complete!

7. Running from inside Git Bash

User@DESKTOP-D93FHU7 MINGW64 ~
$ claude doctor
Claude Code on Windows requires git-bash (https://git-scm.com/downloads/win)...

Proof That Bash Exists and Works

PS> Test-Path "C:\Program Files\Git\bin\bash.exe"
True

PS> & "C:\Program Files\Git\bin\bash.exe" --version
GNU bash, version 5.2.26(1)-release (x86_64-pc-msys)

PS> & $env:CLAUDE_CODE_GIT_BASH_PATH --version
GNU bash, version 5.2.26(1)-release (x86_64-pc-msys)

Notes

  • This just broke after updating to v2.1.69 today. The previous version was working (used it for hours yesterday with no issues).
  • The fact that it fails inside Git Bash confirms the issue is in Claude Code's path validation logic, not in the environment configuration.
  • Possibly related: #10152, #8674, #4507, #25593, #13202, #19108, #26132

What Should Happen?

Claude Code should detect and use Git Bash at C:\Program Files\Git\bin\bash.exe.

Error Messages/Logs

Claude Code was unable to find CLAUDE_CODE_GIT_BASH_PATH path "C:/Program Files/Git/bin/bash.exe"

Steps to Reproduce

  1. Install Git for Windows at default location (C:\Program Files\Git)
  2. Install Claude Code v2.1.69 via irm https://claude.ai/install.ps1 | iex
  3. Run claude doctor from any terminal

Claude Model

Opus

Is this a regression?

Yes, this worked in a previous version

Last Working Version

2.1.68

Claude Code Version

2.1.69

Platform

Anthropic API

Operating System

Windows

Terminal/Shell

PowerShell

Additional Information

_No response_

View original on GitHub ↗

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