[BUG] Claude Code Bash tool incompatible with MSYS/Git Bash on Windows (requires cygpath)

Resolved 💬 8 comments Opened Oct 19, 2025 by ssullivan32 Closed Feb 28, 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:

  • OS: Windows 11 ARM64
  • Shell: MSYS_NT-10.0-26100-ARM64 (Git Bash)
  • Claude Code running in Cursor IDE

Problem:
Every Bash tool invocation fails with:
"Command failed: cygpath -u 'C:\Users\steve\AppData\Local\Temp'
/bin/bash: line 1: cygpath: command not found"

The Bash tool is attempting to use cygpath to convert Windows paths, but this utility only exists in Cygwin environments, not in MSYS/Git Bash.

Steps to reproduce:

  1. Install Git Bash (MSYS2) on Windows
  2. Use Claude Code's Bash tool with any command
  3. Tool fails before executing the command due to missing cygpath

Expected behavior:
Claude Code should detect MSYS/Git Bash and use appropriate path conversion (MSYS handles Windows paths natively without cygpath)

Workaround attempted:

  • Changing VSCode terminal settings to WSL did not resolve the issue
  • The Bash tool appears to operate independently of VSCode terminal configuration

What Should Happen?

Claude Code should detect the MSYS/Git Bash environment (identifiable by MSYS_NT in the platform string or uname -s output) and handle Windows path conversion appropriately without requiring cygpath. MSYS/Git Bash can handle Windows paths natively (e.g., C:\Users\...) or use simple path string conversion. The tool should only attempt to use cygpath when running in an actual Cygwin environment.

Error Messages/Logs

Steps to Reproduce

Environment Setup:
OS: Windows 11 (also reproducible on Windows 10)
Install Git for Windows (which includes Git Bash/MSYS2)
Download from: https://git-scm.com/download/win
Use default installation options
Install VSCode or Cursor IDE
Install Claude Code extension in VSCode/Cursor
Verify Environment:
Open a new terminal in VSCode/Cursor
The environment should show MSYS_NT when checking platform info
Git Bash should be available as a terminal profile
Attempt to Use Claude Code's Bash Tool:
Open Claude Code chat interface
Ask Claude Code to run any bash command that would trigger the Bash tool
Examples:
"Run echo $SHELL"
"Check the current directory with pwd"
"Run ls to list files"
"What is the output of git status?"
Observe the Error:
Every Bash tool invocation fails immediately with:
Command failed: cygpath -u 'C:\Users\[username]\AppData\Local\Temp'
/bin/bash: line 1: cygpath: command not found
The actual command never executes
Error occurs before the user's requested command runs
Verify cygpath is not available:
Open Git Bash terminal manually
Run: which cygpath
Result: which: no cygpath in (...)
This confirms cygpath doesn't exist in MSYS/Git Bash (it's Cygwin-specific)
Confirm Environment Detection:
Check what Claude Code sees in the environment:
Platform shows: MSYS_NT-10.0-[build]-[arch] (e.g., MSYS_NT-10.0-26100-ARM64)
This indicates MSYS/Git Bash, not Cygwin
Expected Result:
Claude Code's Bash tool should execute the requested command successfully
Path conversion should work without requiring cygpath
Actual Result:
All Bash tool commands fail with "cygpath: command not found"
The tool is unusable in MSYS/Git Bash environments
Additional Information:
Changing VSCode's terminal.integrated.defaultProfile.windows setting does NOT fix the issue
The Bash tool appears to operate independently of VSCode terminal configuration
WSL is installed on the system but Claude Code still attempts to use Git Bash/MSYS

Claude Model

None

Is this a regression?

Yes, this worked in a previous version

Last Working Version

_No response_

Claude Code Version

2.0.22 (Claude Code)

Platform

Anthropic API

Operating System

Windows

Terminal/Shell

PowerShell

Additional Information

_No response_

View original on GitHub ↗

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