[Bug] CGPath Error When Reading Files

Resolved 💬 7 comments Opened Sep 8, 2025 by dpnshvrm Closed Jan 7, 2026

Bug Description
I keep getting cgpath error when the claude-code reads any fikes. It wasn't the issue until two days ago

Environment Info

  • Platform: win32
  • Terminal: vscode
  • Version: 1.0.108
  • Feedback ID: c8b0d597-bcad-4aab-a10a-b379941d9dbb

Errors

[{"error":"Error: Failed to create shell snapshot: Command failed: C:\\Users\\dverma\\AppData\\Local\\Programs\\Git\\usr\\bin\\bash.exe -c -l SNAPSHOT_FILE='C:\\Users\\dverma\\.claude\\shell-snapshots\\snapshot-bash-1757363366915-nita0q.sh'\n      # No user config file to source\n      \n      # First, create/clear the snapshot file\n      echo \"# Snapshot file\" >| \"$SNAPSHOT_FILE\"\n      \n      # When this file is sourced, we first unalias to avoid conflicts\n      # This is necessary because aliases get \"frozen\" inside function definitions at definition time,\n      # which can cause unexpected behavior when functions use commands that conflict with aliases\n      echo \"# Unset all aliases to avoid conflicts with functions\" >> \"$SNAPSHOT_FILE\"\n      echo \"unalias -a 2>/dev/null || true\" >> \"$SNAPSHOT_FILE\"\n      \n      echo \"shopt -s expand_aliases\" >> \"$SNAPSHOT_FILE\"\n      \n      \n      # Check for rg availability\n      echo \"# Check for rg availability\" >> \"$SNAPSHOT_FILE\"\n      echo \"if ! command -v rg >/dev/null 2>&1; then\" >> \"$SNAPSHOT_FILE\"\n      echo '  alias rg='\"''\\''C:\\Users\\dverma\\AppData\\Roaming\\npm\\node_modules\\@anthropic-ai\\claude-code\\vendor\\ripgrep\\x64-win32\\rg.exe'\\'''\" >> \"$SNAPSHOT_FILE\"\n      echo \"fi\" >> \"$SNAPSHOT_FILE\"\n      \n      # Add PATH to the file\n      echo \"export PATH=\\$PATH\" >> \"$SNAPSHOT_FILE\"\n  \n    \n\n    at file:///C:/Users/dverma/AppData/Roaming/npm/node_modules/@anthropic-ai/claude-code/cli.js:1503:738\n    at ChildProcess.exithandler (node:child_process:422:5)\n    at ChildProcess.emit (node:events:518:28)\n    at ChildProcess.emit (node:domain:489:12)\n    at maybeClose (node:internal/child_process:1101:16)\n    at ChildProcess._handle.onexit (node:internal/child_process:304:5)","timestamp":"2025-09-08T20:29:36.975Z"}]

View original on GitHub ↗

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