[Windows 11] Shell snapshot path error with Cygdrive paths

Resolved 💬 3 comments Opened Feb 9, 2026 by sun-binwen Closed Feb 12, 2026

Bug Report: Shell snapshot path error on Windows 11

Description

Claude Code consistently throws bash path errors on Windows 11 when executing any bash command, although commands still execute successfully.

Error Messages

/usr/bin/bash: line 1: /cygdrive/c/Users/[USERNAME]/.claude/shell-snapshots/snapshot-bash-*.sh: No such file or directory
/usr/bin/bash: line 1: /cygdrive/c/Users/[USERNAME]/AppData/Local/Temp/claude-[ID]-cwd: No such file or directory

Environment

  • OS: Windows 11
  • Platform: win32
  • Claude Code Model: claude-sonnet-4-5-20250929
  • Node Version: v24.13.0
  • Shell: /usr/bin/bash (Cygwin-style path detected)

Steps to Reproduce

  1. Install Claude Code on Windows 11
  2. Run any bash command (e.g., node -v)
  3. Observe the error messages in stderr

Expected Behavior

Commands should execute without path-related errors in stderr.

Actual Behavior

Every bash command execution produces:

  • "No such file or directory" errors for shell snapshot files
  • "No such file or directory" errors for temporary working directory files
  • Commands still execute successfully, but stderr is polluted with errors

Impact

  • Severity: Medium (commands work but UX is degraded)
  • User Experience: Confusing error messages appear on every command
  • Windows 11 Users: Affects Windows environment specifically

Root Cause Analysis

The issue appears to be related to:

  1. Path format mismatch: Claude Code is using Cygwin-style paths (/cygdrive/c/...) on Windows
  2. Temporary file creation/access failing in the shell snapshot mechanism
  3. Possible issue with shell environment detection on Windows

Suggested Fix

  • Improve Windows path handling in the shell snapshot mechanism
  • Detect Windows environment and use appropriate path formats
  • Ensure temporary files are created with correct Windows-compatible paths

Additional Context

This affects the user experience for Windows 11 users and should be prioritized to improve cross-platform compatibility.

Reproduction Rate

100% - occurs on every bash command execution

---
Note: This issue was reported to improve Windows 11 support and user experience in Claude Code.

View original on GitHub ↗

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