[BUG] FIX - Claude Code v2.0.x has trouble shelling Git and reports cannot find 'cygpath'

Resolved 💬 5 comments Opened Oct 8, 2025 by dimension-zero Closed Jan 7, 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?

Whenever I ask Claude Code to shell Git or to shell a PowerShell Core script, it complains

``● Bash(where.exe git)
⎿  Error: Command failed: cygpath -u 'C:\Users\MATHEW~1.BUR\AppData\Local\Temp'
/usr/bin/bash: line 1: cygpath: command not found
/usr/bin/bash: line 1: cygpath: command not found
/usr/bin/bash: line 1: cygpath: command not found
/usr/bin/bash: line 1: cygpath: command not found
/usr/bin/bash: line 1: cygpath: command not found
`` (5 repeats)

And then typically

```● Bash(npx tsx scripts/manage-samples.ts)
⎿  Error: Command failed: cygpath -u 'C:\Users\DIMENS~1.ZER\AppData\Local\Temp'
/usr/bin/bash: line 1: cygpath: command not found

● The bash environment is still broken. Let me add it to package.json so you can run it directly:

● Now check if tsx is installed:

● Read(package.json)
⎿  Read 35 lines (ctrl+o to expand)

● tsx is not installed. Add it:

● Run in your terminal:

npm install
npm run download-samples

This will:

  1. Install tsx
  2. Run the TypeScript sample downloader
  3. Show any failures with error details

Once you run it, paste the output and I'll fix any failures.

! npm install
⎿  Command failed: Command failed: cygpath -u 'C:\Users\DIMENS~1.ZER\AppData\Local\Temp'
/usr/bin/bash: line 1: cygpath: command not found

! npm run download-samples
⎿  Command failed: Command failed: cygpath -u 'C:\Users\DIMENS~1.ZER\AppData\Local\Temp'
/usr/bin/bash: line 1: cygpath: command not found

Claude Code 2.0.10 is having issue with shelling commands. Bash appears fundamentally broken```

What Should Happen?

CC should be able to shell to "Bash" whether on macOS, Linux, Windows.
It was able to do this fine with versions <2.0 on Windows but stopped >= v2.0.
NO issue on macOS or Linux. Works fine on WSL2/Ubuntu.

Error Messages/Logs

As above

Steps to Reproduce

As above
BUT THERE IS A SOLUTION
CC versions >= 2.0 appear to look for Git in C:\Program Files\Git (on Windows) not %USERDIR%\AppData\Local\Git
Solution is to install Git in BOTH Global (machine) and Local (user) locations:
winget install --scope machine git.git
winget install --scope user git.git

Issue then goes away.

Claude Model

Sonnet (default)

Is this a regression?

Yes, this worked in a previous version

Last Working Version

<= v2.0

Claude Code Version

2.0.10 (Claude Code)

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

PowerShell

Additional Information

THERE IS A SOLUTION
CC versions >= 2.0 appear to look for Git in C:\Program Files\Git (on Windows) not %USERDIR%\AppData\Local\Git
Solution is to install Git in BOTH Global (machine) and Local (user) locations:
winget install --scope machine git.git
winget install --scope user git.git

Issue then goes away.

View original on GitHub ↗

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