[BUG] [platform:windows] git-bash -> bash: /c: Is a directory Exit 126
Resolved 💬 9 comments Opened Jul 15, 2025 by oryon-dominik Closed Jul 21, 2025
Environment
- Claude CLI version: 1.0.51 (Claude Code)
- Operating System: Windows 11
- Terminal: Windows-Terminal Version: 1.22.11141.0
Bug Description
Claude Code's Bash tool generates malformed commands on Windows by mixing Unix and Windows command syntax. When
Claude attempts to execute bash commands, it incorrectly constructs commands with Windows CMD syntax (/c CALL)
in a bash context, causing execution failures.
## Steps to Reproduce
- Run Claude Code in Windows Terminal with PowerShell 7 and Git Bash available
- Have Claude execute any bash command using the Bash tool
- Claude internally generates:
/usr/bin/bash --login -i /c CALL <path.to.node.exe> - Command fails with error:
bash: /c: Is a directory Exit 126
## Expected Behavior
Claude Code should generate proper bash commands for Windows environments, such as:
bash --login -i -c "command"(for Git Bash)- Or use appropriate Windows command syntax if targeting CMD
## Actual Behavior
Claude Code generates hybrid commands mixing Unix bash invocation (/usr/bin/bash) with Windows CMD flags (/c), resulting in syntax errors and command execution failures.
CALL
## Additional Context
- This occurs when Claude uses the Bash tool internally
- The
/cflag is valid for Windows CMD but not for bash - The
CALLcommand is Windows batch syntax, not bash - Git Bash is installed and functional when used directly
This issue has 9 comments on GitHub. Read the full discussion on GitHub ↗