[BUG] Cygwin: CWD temp file path missing /cygdrive prefix
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?
On Cygwin (Windows), the Claude Code shell integration layer writes a CWD-tracking temp file using the Windows-mapped path (e.g., /c/cygwin64/tmp/claude-xxxx-cwd) instead of the Cygwin-translated path (/cygdrive/c/cygwin64/tmp/claude-xxxx-cwd). Bash then fails to read the file and produces an error after every single Bash tool invocation:
/usr/bin/bash: line 1: /c/cygwin64/tmp/claude-xxxx-cwd: No such file or directory
What Should Happen?
The Cygwin-translated path (/cygdrive/c/cygwin64/tmp/claude-xxxx-cwd) should be used and the error should not occur.
Error Messages/Logs
The error reported is:
/usr/bin/bash: line 1: /c/cygwin64/tmp/claude-xxxx-cwd: No such file or directory
Steps to Reproduce
- Open Cygwin terminal (Mintty)
- Run
claude - Request an action that requires Claude to execute a command.
Claude Model
Opus
Is this a regression?
I don't know
Last Working Version
_No response_
Claude Code Version
2.1.112
Platform
Anthropic API
Operating System
Windows
Terminal/Shell
Other
Additional Information
Previously reported as #49704, but erroneously marked as a duplicate and closed.
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗