claude-code - 💡(How to fix) Fix [BUG] Cygwin: CWD temp file path missing /cygdrive prefix [1 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
anthropics/claude-code#49704Fetched 2026-04-17 08:33:46
View on GitHub
Comments
1
Participants
2
Timeline
4
Reactions
0
Timeline (top)
labeled ×3commented ×1

Error Message

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: 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:

Code Example

The error reported is:

/usr/bin/bash: line 1: /c/cygwin64/tmp/claude-xxxx-cwd: No such file or directory
RAW_BUFFERClick to expand / collapse

Preflight Checklist

  • I have searched existing issues and this hasn't been reported yet
  • This is a single bug report (please file separate reports for different bugs)
  • 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

  1. Open Cygwin terminal (Mintty)
  2. Run claude
  3. 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.

extent analysis

TL;DR

The issue can be resolved by modifying the Claude Code shell integration layer to use the Cygwin-translated path instead of the Windows-mapped path for the CWD-tracking temp file.

Guidance

  • Investigate the Claude Code shell integration layer to identify where the Windows-mapped path is being used and modify it to use the Cygwin-translated path.
  • Verify that the Cygwin-translated path is correctly formatted as /cygdrive/c/cygwin64/tmp/claude-xxxx-cwd instead of /c/cygwin64/tmp/claude-xxxx-cwd.
  • Test the modified Claude Code shell integration layer to ensure that the error no longer occurs after Bash tool invocations.
  • Consider using Cygwin's cygpath command to convert Windows paths to Cygwin paths, if available.

Example

No code snippet is provided as the issue does not contain sufficient information about the implementation details of the Claude Code shell integration layer.

Notes

The solution assumes that the issue is caused by the incorrect path being used by the Claude Code shell integration layer. If the issue persists after modifying the path, further investigation may be necessary to identify the root cause.

Recommendation

Apply workaround: Modify the Claude Code shell integration layer to use the Cygwin-translated path, as this is the most likely cause of the issue and a workaround can be implemented without requiring an upgrade to a fixed version.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

claude-code - 💡(How to fix) Fix [BUG] Cygwin: CWD temp file path missing /cygdrive prefix [1 comments, 2 participants]