Windows: Sandbox blocks shell builtins (echo, pwd, date, printf) with silent exit code 1
Resolved 💬 2 comments Opened Feb 18, 2026 by rubrical-worker Closed Feb 18, 2026
Description
On Windows 11 with Git Bash, Claude Code's sandbox blocks shell builtins and /usr/bin utilities. Commands silently fail with exit code 1 and no stderr output. External executables (git, node, gh) work fine through the same sandbox.
Environment
- OS: Windows 11 Pro 10.0.26200
- Shell: Git Bash (C:\Program Files\Git\usr\bin\bash.exe)
- Git: 2.51.2.windows.1
- Claude Code: Latest (as of 2026-02-18)
Reproduction
These commands fail with exit code 1, no output, no stderr:
echo hello
printf "hello\n"
pwd
date "+%Y-%m-%d"
/usr/bin/echo hello
which date
type date
These commands work fine:
git --version
git branch --show-current
node -e "console.log('hello')"
gh --version
Running the exact same failing commands through Node.js child_process succeeds, proving it's not a system issue:
node -e "const {execSync}=require('child_process'); console.log(execSync('echo hello',{encoding:'utf8'}).trim())"
// Output: hello
Impact
- Cascade failures: When parallel Bash tool calls are made and one hits a blocked command, all sibling calls abort with "Sibling tool call errored"
- Silent failures: No stderr output makes debugging difficult — commands just return exit code 1
- Common operations broken:
echo,pwd,date,printfare fundamental shell operations used constantly in workflows
Workarounds
- Use
gitcommands where possible (e.g.,git rev-parse --show-toplevelinstead ofpwd) - Use
node -e "console.log(...)"instead ofecho/printf/date - Use dedicated tools (Read, Glob, Grep) instead of
cat,ls,grep
Additional Context
- No
.bashrc,.bash_profile, or.profileexists in the user home directory - No Claude Code settings or hooks are configured
- The shell PATH includes standard Git Bash paths (
C:\Program Files\Git\usr\bin, etc.)
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗