Bash tool on Windows Git Bash cannot find common binaries (git, task, ls) after 2.1.x update
Environment
- OS: Windows 11 (10.0.26200)
- Shell: Git Bash (bash from C:\Program Files\Git)
- Claude Code version: reproduces on latest 2.1.x at time of filing
- Regression: Yes — worked ~2 days ago, broke after a recent update
Symptoms
Inside Claude Code's Bash tool, common binaries are not resolvable on the PATH, even though they exist and work from a normal PowerShell / Git Bash terminal on the same machine:
git→command not foundtask→command not foundls,grep,find,wc,which,where→command not foundpowershell.exe→command not found
echo $PATH inside the Bash tool prints the Windows PATH (;-separated) prepended to a handful of :-separated unix-style plugin-cache entries. Bash treats the whole string as :-separated, so only the tail of the string resolves — effectively nothing from the system PATH works.
What still works
- Shell builtins (
echo,cd,pwd) - Binaries invoked by absolute unix path that land inside MSYS:
/mingw64/bin/gitworks/usr/bin/lsworks- Binaries invoked by absolute Windows-style unix path inside
Program Files: "/c/Program Files/GitHub CLI/gh.exe"works (with quoting)- BUT: some Windows-side binaries under
C:\Users\<user>\go\bin\are unreachable from either form (/c/Users/.../task.exeerrors withNo such file or directory, even when the file exists — verified by/usr/bin/lson the parent directory).
Repro
- Windows 11, Git Bash as the Claude Code shell
- Fresh session
- Ask Claude to run
git statusortask --versionin a project - Observe
command not found
Impact
Cannot run task, git, or any CI/test tooling from inside Claude Code via the bare command name. Work that relies on Claude running its own verification (task ci:all, git status before commits, go test, etc.) is blocked — the user must shell out manually. Absolute-path workarounds help for a few tools but are brittle (spaces, drive-letter translation, missing paths).
Workaround
None clean. Absolute unix-path invocation works for a subset (/mingw64/bin/git, /usr/bin/ls). Space-containing Windows paths need shell quoting and only sometimes resolve.
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗