[BUG] cygpath command failing on Windows MINGW64 environment - Write and Bash tools not working
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?
I'm experiencing a critical issue where Claude Code cannot create files or execute bash commands on my Windows system with MINGW64. All attempts to use the Write tool or Bash tool fail with a cygpath error.
What Should Happen?
Steps to Reproduce
- Open Claude Code in a project directory on Windows with Git Bash/MINGW64 installed
- Attempt to create any file using the Write tool
- OR attempt to execute any bash command using the Bash tool
Expected Behavior
Files should be created successfully and bash commands should execute normally.
Actual Behavior
All Write and Bash operations fail with the error:
Command failed: cygpath -u 'C:\Users\HIPOLI~1\AppData\Local\Temp'
Environment Information
- Platform: Windows (win32)
- OS Version: MINGW64_NT-10.0-26200 3.5.4-395fda67.x86_64
- Shell: bash (Git Bash)
- Primary working directory: D:\PROJETOS\01_PROJETOS\001
- Model: Claude Sonnet 4.5 (claude-sonnet-4-5-20250929)
Error Examples
Write tool attempt:
Error calling tool (Write): Command failed: cygpath -u 'D:\PROJETOS\01_PROJETOS\001\TESTE.md'
Bash tool attempt:
Command failed: cygpath -u 'C:\Users\HIPOLI~1\AppData\Local\Temp'
Additional Context
- I can manually create and edit files in the target directory without issues
- The error consistently references the temp directory path with short name format (HIPOLI~1)
- This affects all file operations through Claude Code
- Read tool appears to work, but Write and Bash tools are completely broken
Impact
This makes Claude Code unusable for any tasks requiring file creation or bash command execution on Windows with MINGW64 environment.
Error Messages/Logs
● Write(TESTE.md)
⎿ Error writing file
● Deixe-me tentar novamente com o formato correto de caminho.
● Write(TESTE.md) ⎿ Error writing file
● Write(TESTE.md) ⎿ Error writing file
● Write(/d/PROJETOS/01_PROJETOS/001/TESTE.md) ⎿ Error writing file
● Deixe-me verificar o diretório atual primeiro.
● Bash(pwd) ⎿ Error: Command failed: cygpath -u 'C:\Users\HIPOLI~1\AppData\Local\Temp'
● Bash(cd /d/PROJETOS/01_PROJETOS/001 && echo "# Arquivo de Teste" > TESTE.md && cat TESTE.md) ⎿ Error: Command failed: cygpath -u 'C:\Users\HIPOLI~1\AppData\Local\Temp'
Steps to Reproduce
● Write(TESTE.md)
⎿ Error writing file
● Deixe-me tentar novamente com o formato correto de caminho.
● Write(TESTE.md) ⎿ Error writing file
● Write(TESTE.md) ⎿ Error writing file
● Write(/d/PROJETOS/01_PROJETOS/001/TESTE.md) ⎿ Error writing file
● Deixe-me verificar o diretório atual primeiro.
● Bash(pwd) ⎿ Error: Command failed: cygpath -u 'C:\Users\HIPOLI~1\AppData\Local\Temp'
● Bash(cd /d/PROJETOS/01_PROJETOS/001 && echo "# Arquivo de Teste" > TESTE.md && cat TESTE.md) ⎿ Error: Command failed: cygpath -u 'C:\Users\HIPOLI~1\AppData\Local\Temp'
Claude Model
None
Is this a regression?
Yes, this worked in a previous version
Last Working Version
_No response_
Claude Code Version
2.1.42 (Claude Code)
Platform
Anthropic API
Operating System
Windows
Terminal/Shell
PowerShell
Additional Information
_No response_
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗