Windows: Backslashes stripped from paths causing 'No such file or directory' errors
Status Closed — duplicate
Maintainer reply None cached
Workaround ✓ Mentioned in description ↑
Activity 3 comments · opened Jan 31, 2026 · closed Feb 3, 2026
Description
On Windows with Git Bash, Claude Code internally generates paths with backslashes that get stripped when passed to bash commands, causing errors like:
Error: Exit code 1
/usr/bin/bash: line 1: cd: C:Usersrichidvisecloudfish-speech: No such file or directory
The path C:\Users\richi\dvise\cloud\fish-speech becomes C:Usersrichidvisecloudfish-speech (all backslashes removed).
Environment
- OS: Windows 11
- Shell: Git Bash (
/usr/bin/bash) - Claude Code version: Latest
Steps to Reproduce
- Run Claude Code on Windows with Git Bash as the shell
- Have Claude Code attempt to run bash commands that involve changing directories or referencing Windows paths
- Paths with backslashes get mangled
Expected Behavior
Paths should be properly escaped or converted to forward slashes before being passed to bash.
Workaround
Using forward slashes (C:/Users/...) or Git Bash-style paths (/c/Users/...) works correctly.
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗