[Bug] Bash tool fails to handle Windows backslash path separators
Bug Description
When claude uses the Bash tool on windows, it tries to use the backslash (\) as a path separator, but it fails to work properly, resulting in Claude just choosing another tool (Read):
Bash(grep -E "^model:" C:\Users\mcsei\.claude\agents\log4net-instrumenter.md C:\Users\mcsei\.claude\agents\signalr-hub-generator.md C:\Users\mcsei\.claude\agents\sto…)
⎿ Error: Exit code 2
grep: C:Usersmcsei.claudeagentslog4net-instrumenter.md: No such file or directory
grep: C:Usersmcsei.claudeagentssignalr-hub-generator.md: No such file or directory
grep: C:Usersmcsei.claudeagentsstored-procedure-documenter.md: No such file or directory
grep: C:Usersmcsei.claudeagentswebapi-controller-generator.md: No such file or directory
grep: C:Usersmcsei.claudeagentsenv-validator.md: No such file or directory
grep: C:Usersmcsei.claudeagentsemail-template-builder.md: No such file or directory
grep: C:Usersmcsei.claudeagentsmcp-server-architect.md: No such file or directory
Environment Info
- Platform: win32
- Terminal: windows-terminal
- Version: 2.1.12
- Feedback ID: b7aa4913-8d80-4f9d-8c8c-730d2ae1f2f1
Errors
[{"error":"Error: EPERM: operation not permitted, symlink 'C:\\Users\\mcsei\\.claude\\projects\\D--jposervices-com\\5928e48c-304d-4338-8ccd-31f771f2ee24\\subagents\\agent-add896f.jsonl' -> 'C:\\Users\\mcsei\\AppData\\Local\\Temp\\claude\\D--jposervices-com\\tasks\\add896f.output'\n at symlinkSync (node:fs:1819:11)\n at BDA (file:///C:/Users/mcsei/AppData/Local/nvm/v20.19.5/node_modules/@anthropic-ai/claude-code/cli.js:1552:10045)\n at yI2 (file:///C:/Users/mcsei/AppData/Local/nvm/v20.19.5/node_modules/@anthropic-ai/claude-code/cli.js:2280:1176)\n at file:///C:/Users/mcsei/AppData/Local/nvm/v20.19.5/node_modules/@anthropic-ai/claude-code/cli.js:2717:806\n at AsyncLocalStorage.run (node:async_hooks:346:14)\n at g11 (file:///C:/Users/mcsei/AppData/Local/nvm/v20.19.5/node_modules/@anthropic-ai/claude-code/cli.js:385:32410)\n at Object.call (file:///C:/Users/mcsei/AppData/Local/nvm/v20.19.5/node_modules/@anthropic-ai/claude-code/cli.js:2717:513)\n at process.processTicksAndRejections (node:internal/process/task_queues:95:5)\n at async It5 (file:///C:/Users/mcsei/AppData/Local/nvm/v20.19.5/node_modules/@anthropic-ai/claude-code/cli.js:2700:19680)","timestamp":"2026-01-19T21:48:58.148Z"}]This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗