[BUG] cygdrive shell snapshot: No such file or directory

Resolved 💬 5 comments Opened Aug 15, 2025 by Jhh12 Closed Jan 8, 2026

Environment

  • Platform (select one):
  • [ ] Anthropic API
  • Claude CLI version: 1.0.81
  • Operating System: Windows 11
  • Terminal: cmd

Bug Description

On Windows, Claude Code can't run various shell script commands as it does on other operating systems—something as simple as python *.py or cd directory fails to execute. It’s even less capable than Cursor!

Steps to Reproduce

  1. <!-- First step -->

Create any folder and inside it make a Python file named test.py

  1. <!-- Second step -->

In that file write print("Claude Code executes shell commands normally!").

  1. <!-- And so on... -->

Open a terminal, start Claude, and tell it to run python test.py—it throws an error.

Expected Behavior

Using Claude Code on Windows should be as smooth and seamless as it is on Linux-based systems like Ubuntu.

Actual Behavior

Error: /usr/bin/bash: line 1:
/cygdrive/c/Users/***/.claude/shell-snapshots/snapshot-bash-1755280857225-lnfzuj.sh: No such file or
directory

Additional Context

Snapshot file

Unset all aliases to avoid conflicts with functions

unalias -a 2>/dev/null || true
shopt -s expand_aliases

Check for rg availability

if ! command -v rg >/dev/null 2>&1; then
alias rg=''\''C:\Users\***\AppData\Roaming\npm\node_modules\@anthropic-ai\claude-code\vendor\ripgrep\x64-win32\rg.exe'\'''
fi
export PATH=$PATH

View original on GitHub ↗

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