Bash execution issues on Windows — page 2
Issues the maintainers labelled both platform:windows and area:bash.
254 issues · 54 open · 200 resolved (79%) · first seen Feb 23, 2026
Is this getting better or worse?
This class of problem is converging. 84 new reports in the last 90 days vs 130 in the 90 before — -35%. The open backlog peaked at 61 in 2026-04 and sits at 54 today.
Derived by counting each matching issue from its creation date until it closed. First-party
computation over the anthropics/claude-code tracker — the trend is not published
anywhere upstream.
Which builds report this
145 of these reports name the Claude Code build they were running, spanning 75 releases. Heaviest reporters:
- Claude Code v2.1.53
- Claude Code v2.1.81
- Claude Code v2.1.111
- Claude Code v2.1.143
- Claude Code v2.1.112
- Claude Code v2.1.63
- Claude Code v2.1.69
- Claude Code v2.1.233
Report volume, not a defect count: an issue can mention a build without that build having caused the failure. Versions come from the version string in the bug-report template, matched against real published tags.
Do these get fixed?
Median time to close is 33 days across 200 closures. Of the 200 closures with a recorded reason, 24% were closed as completed and 152 as not-planned or duplicate. The most recent completed fix landed in 2026-08.
Workarounds reported by the community
112 of these issues post a workaround someone says worked. The highest-engagement ones:
- [BUG] Permission prompt incorrectly triggers on cd instead of the actual command in compound bash statements
- I'm having some success with the following very explicit workaround in :
Found in the thread of #28240 · still open - [BUG] Unnecessary "cd" prepended to Bash commands on Windows due to path format mismatch
- …ermission system matches the instead of the actual command. Workaround — PreToolUse hook to auto-approve cd-prefixed commands: includes a hook that handles this pattern while still blocking dangerous commands in the chai…
Found in the thread of #30524 · resolved - [BUG] Stale .git/index.lock left behind after Bash tool git commands on Windows
- …to it exists, even if the process has logically completed. Workaround Manually delete the lock file: Environment - OS: Windows 11 Enterprise 10.0.26200 - Shell: Git Bash - Claude Code: Latest (CLI) - Related: 11005 (clo…
Found in the description of #28546 · still open - [Bug] Bash tool execution failing or non-functional
- …fine to the same directory. Rolling back to 2.1.52 per the workaround.
Found in the thread of #28333 · resolved - [Bug] EINVAL on Windows: Bash commands fail - cannot open task output file
- Still reproducible on v2.1.56 — workaround found Environment: - Claude Code v2.1.56 (native install) - Windows 11 Pro Build 26200 - Git Bash (C:\Program Files\Git\bin\bash.exe) Finding: The v2.1.55 fix is incomplete. The…
Found in the thread of #28364 · resolved
Excerpts are quoted from the linked issue so you can judge relevance before opening it. Threads that only ask for a workaround, or report that there is none, are excluded. These are community suggestions, not official guidance from Anthropic — read the full thread before applying one.
Matching issues 101–200
Ranked by community engagement (reactions weighted over comments).
- [BUG] Bash tool hangs/returns empty on Windows 11 — causes token-burning retry loops
- [ Bash shell crashes on every invocation on Windows — MSYS2 fatal error (exit code 3221225477)]
- [MODEL] Claude Code CLI executed Remove-Item -Recurse -Force on pnpm worktrees, triggering catastrophic NTFS junction traversal — permanent deletion of user profile folders and source code
- [BUG] EINVAL: invalid argument when running Bash tool on Windows — task output file cannot be opened
- [MODEL] Uses PowerShell here-string (@'...'@) inside the Bash tool on Windows, silently corrupting a git commit message
- Bash permission allow-list rules fail to match Windows drive-letter paths
- [BUG] Regression in 1.15962.2 / SDK 2.1.197 — Bash tool dispatch never reaches the VM (Exit code 1, no output)
- [BUG] Windows Desktop app: `!` interactive shell forces PowerShell, ignoring defaultShell:"bash" (CLI works with identical settings)
- [BUG] Bash tool broken on Windows: /usr/bin/bash: -c: line 26: unexpected EOF while looking for matching backtick
- Regression: compound && commands prompt for approval even when all segments are individually allowlisted (v2.1.158–2.1.168, Windows)
- Bash tool: PATH not Windows->POSIX translated when MSYS bash subprocess respawns mid-session
- [BUG] Claude is blocked from executing sleep commands
- Bash tool on Windows hangs on npx/npm commands and ignores explicit timeout
- [Bug] Working directory falsely reported as "deleted" on Windows when cwd is an ImDisk ramdrive — every shell call blocked by recovery loop
- Tool result intermittently dropped as "[Tool result missing due to internal error]" for parallel Bash calls
- [BUG] Bash tool and SessionStart hooks fail with EEXIST on Windows due to non-idempotent mkdir of session-env
- Bash tool: EUNKNOWN uv_spawn error on Windows (all shells fail)
- [Claude-Sonnet-4-6] - Copy file error, never learns correct method in Windows
- [BUG] Bash tool wedges mid-session with `EEXIST: mkdir session-env/<UUID>` and never recovers
- Bug: Bash tool doesn't decode XML entities in command parameters
- [BUG] EEXIST on session-env mkdir despite recursive:true (v2.1.108, Windows)
- [BUG] Every Bash tool call fails with Working directory "..." no longer exists, but Glob/Read against the same path succeed
- [P1][Bug] Failed Bash tool call errors not displayed to user
- Windows: /tmp/ path diverges between Python and az, shipping stale zips
- [BUG] Error: Claude Code process exited with code 1 : Claude Code unable to find CLAUDE_CODE_GIT_BASH_PATH even when file exists and settings.json is read correctly - Windows
- Bash tool on Windows Git Bash cannot find common binaries (git, task, ls) after 2.1.x update
- Permission walker unhandled node type `file_redirect` blocks allow-list for commands with redirects/pipes
- [Bug] Unidentified process silently runs `git pull --ff-only` and checks out main mid-session (Windows)
- ELECTRON_RUN_AS_NODE leaks into Bash tool on Windows, breaks Electron app launches
- [BUG] Shell redirect target saved as standalone permission entry in settings.local.json
- Agent bash shells should not source user .bashrc/.bash_profile
- [BUG] Shell commands fail when Windows username contains parentheses
- Bash tool fails with EINVAL on WSL commands in Windows 11
- [BUG] Bash tool silently converts ! (0x21) to \! (0x5C 0x21) — corrupts arguments to executables
- [BUG] Windows: sandbox bash ignores CLAUDE_CODE_SHELL and sandbox.enabled: false (v2.1.59)
- [BUG] Claude Code generates 2>/dev/null redirections in Bash commands on Windows
- [BUG] Windows: Bash tool fails with EINVAL on tasks/*.output file open (v2.1.53)
- Bash tool fails with EINVAL on Windows when working directory path contains hyphens in temp file path
- Bash tool: unquoted temp path causes 'Permission denied' on Windows with spaces in VSCode path
- [BUG] fairly serious permissions problem : "cd*"
- Bash tool unescapes backslashes inside a quoted heredoc
- [Bug] Bash tool children on Windows can't unlink AF_UNIX sockets (error 1920, path poisoned) — breaks unix-socket daemons
- [BUG] Bash commands produce no output on Windows 11
- [BUG] Unable to use Bash tool.
- [BUG] Windows: hidden cmd.exe re-parse of Bash/PowerShell tool commands pre-creates zero-byte redirect-target junk files in cwd
- [BUG] It seems that Claude Code on Antigravity is not using windowsHide: true / CREATE_NO_WINDOW while running bash, grep, read, etc.
- [FEATURE]
- feat: Bash 工具支持实时流式输出
- sed on Windows silently converts CRLF to LF, breaking files
- [BUG] Bash (dir/b "C: \ FilePackage") error Path contains null bytes
- [BUG] Bash tool creates 0-byte phantom files with code-fragment names during complex python -c execution (Windows + Git Bash)
- Claude Code executed destructive init-db --force against real database after user explicitly rejected the same command
- [BUG] Bash tool cwd set to local plugin marketplace directory instead of invocation directory
- [BUG] Shell: bash (use Unix shell syntax, not Windows) 这个程序内置的提示存在歧义会导致理解成错误的含义
- [BUG] PowerShell encoding bug and that you had to spend credits to fix a problem
- Bash tool background command swallows subprocess exit code (reports 0 despite sys.exit(1))
- [Bug] REPL silently exits to PowerShell prompt mid-turn on dense subprocess chains
- [BUG]
- Shell snapshots generate empty if-then-fi block
- [BUG]Claude Code on Windows should look for bash at C:\Program Files\Git\bin\bash.exe (or check both paths).
- [BUG] Bash tool bypasses configured working directory boundaries
- Bug: "Unhandled node type: string" before Bash tool permission prompt (2.1.118)
- Bash tool fails with EEXIST when session-env path resolves through a reparse point (OneDrive Files-On-Demand)
- [BUG] Claude Code wastes wall-clock time polling for background tasks that already completed
- Bash tool invocations fail with EPERM on Windows when writing per-task output capture file under %LOCALAPPDATA%\Temp\claude\...\tasks\*.output
- TZ env var ignored in Windows Bash — date returns UTC instead of local time
- EEXIST: file already exists on every second Bash tool call (Windows)
- [BUG] vs code windows bash terminal integration
- Claude cannot reliably launch GUI applications — repeated failures to start Python app
- [BUG] Shell not found on Windows even with SHELL env variable set
- Interactive stdin prompts don't work in Bash tool (e.g. gh secret set)
- [Bug] Tracked files lost local changes after `git checkout -- .` and untracked files deleted after `git clean -fd`
- Windows Git Bash: process crash (exit code 4294967295) after successful shell snapshot
- [Bug] Performance degradation in no-flicker mode during long-running bash processes
- [Bug] Screenshot capture fails to process image data
- [BUG] Claude Code deleted all files in project directory via generated build.bat
- [BUG] Working Directory Mismatch — uses user's home directory instead of the current working directory
- Agent invocation crashes with 'Internal tools error' when subagent Bash command contains 2>&1 redirect (Windows Git Bash, v2.1.89)
- [BUG] Claude let's scripts run silently with no known cause.
- [BUG] Bash tool launches WSL window on Windows despite defaultShell: "powershell"
- Bash permission prompt doesn't expand shell variables in path detection
- Windows: git-bash detection fails when Claude CLI runs inside a git-bash subprocess
- [FEATURE] Allow configuring the shell Claude Code uses for Bash tool calls (Windows)
- Custom statusLine command resets shell CWD between Bash tool calls
- [BUG] EOF error with qutoes
- "Permission denied" error on Windows when username contains spaces (unquoted temp file path)
- [BUG] Bash tool corrupts UTF-8 non-ASCII characters in inline command arguments on Windows (Git Bash)
- Windows: Real nul files from older versions require \\?\ path for detection and cleanup
- [BUG] Shell snapshot should capture PATH from bash's translated environment, not from the raw Windows environment
- Windows: literal "nul" file created in working directories
- [BUG] Claude Code calls `cd` too many times when not needed
- Claude Code umgeht PreToolUse:Edit Hook durch Python-Script via Bash
- permissions: Bash(rm -r:*) does not match rm -rf
- [Bug] Bash tool silently strips backslashes on Windows/Git Bash
- Subagent Bash cwd resets to another subagent's worktree, with no cwd param to pin it
- [BUG]
- Windows: background Bash tool processes orphaned across sessions (block Git installer, leak resources)
- [BUG]
- Bash tool leaks orphaned child processes on Windows timeout (runaway ind / scans accumulate for hours)
- [DOCS] `[Bash tool] Windows crash when launch directory is deleted, locked, or unmounted mid-command is not documented`