Bash execution issues on Windows — page 3
Issues the maintainers labelled both platform:windows and area:bash.
335 issues · 100 open · 235 resolved (70%) · first seen Feb 23, 2026
Is this getting better or worse?
This class of problem is holding steady. 110 new reports in the last 90 days vs 125 in the 90 before — -12%. The open backlog peaked at 100 in 2026-10 and sits at 100 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
210 of these reports name the Claude Code build they were running, spanning 102 releases. Heaviest reporters:
- Claude Code v2.1.53
- Claude Code v2.1.286
- Claude Code v2.1.281
- Claude Code v2.1.259
- Claude Code v2.1.81
- Claude Code v2.1.251
- Claude Code v2.1.111
- Claude Code v2.1.278
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 34 days across 235 closures. Of the 235 closures with a recorded reason, 23% were closed as completed and 182 as not-planned or duplicate. The most recent completed fix landed in 2026-10.
Workarounds reported by the community
139 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] Bash cd-compound-read guard prompts on absolute cd targets whenever a Read() deny rule exists (Windows Git Bash, 2.1.257-2.1.259)
- …ing the 2.1.259 changelog entry added. One more note on the workaround: removing the deny rules is not something the agent can do for you when is in effect. Both the Bash edit and the Edit tool call on are refused by the…
Found in the thread of #91650 · 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 - bypassPermissions mode now prompts on `cd DIR && grep …` when a Read() deny rule is configured (regression in 2.1.259)
- …ws the mode was throughout and auto mode was never entered. Workaround Tell agents not to use prefixes or recursive grep over directories (use explicit file lists or a file-search tool). That removes the prompts but mean…
Found in the description of #91683 · still open
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 201–300
Ranked by community engagement (reactions weighted over comments). Listing the top 300 of 335 matches; the statistics above cover all 335.
- feat: Bash 工具支持实时流式输出
- [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
- Opened by mistake
- [Bug] Windows: killing background Bash task leaves pyenv-win python.exe orphaned, output file grows unbounded
- [BUG] Windows/Git Bash: if the 10-second login-shell PATH probe times out, the Bash tool loses PATH for the whole session
- [BUG] [Windows] TaskStop / background-task kill leaves Git Bash child processes running (orphaned grep, find, du, sleep for hours)
- [Windows] Monitor / background Bash pipelines orphan tail/grep grandchildren after bash exits (66 found, oldest 167 h)
- [Bug] Auto mode not functioning due to preferences to constantly combine CD with other commands
- [BUG] Windows: sub-agent rm -rf on the 8.3 short-name alias of the home dir wiped ~116 GB; TaskStop left it running ~50 min; agent reported 'looks intact' (related: #92593, #95426, #97660)
- [BUG] Windows: the PowerShell command-safety parser's encoded launch trips antivirus heuristics (6 alerts per affected command)
- [harness] Parallel Bash calls in one response share the shell's working directory; a cd in one call breaks a sibling's relative paths
- [harness] Agent tool surface: no per-call tool restriction, model required even for typed agents, shared scratchpad, Bash mangling of backslashes/backticks, user question blocks notifications
- [BUG] Windows: the Bash tool halves every pair of backslashes before bash reads the command
- [Bug] Claude hangs after command execution with no token consumption
- [Windows] Stray/truncated files caused by a third-party hook (`cmd.exe /d /c …` mangled by Git Bash, cmd executes hook JSON) — not a Read/Edit or model shell bug
- [Windows] bashEditDiff snapshots every Bash call with a full `git status` (fsmonitor forced off) — on by default in bypassPermissions
- [BUG] Foreground Bash past the 600 s cap becomes an orphan with no exit notification, and Monitor accepts unlimited duplicate arms on the same condition (60 in 8 min)
- [BUG] Bash/PowerShell tool execution broken mid-session — basic binaries missing (ssh, ls, which)
- [BUG] Auto mode system message instructs Claude to use Bash, even on Windows
- [BUG] Windows: two Bash tool calls never return and never time out — main session deadlocks for 53 min; agent completions and user input queue behind the dead turn
- Interactive CLI loses completed shell results after worktree transitions on Windows
- Generated commands don't match the user's known OS/shell (Bash emitted for Windows/PowerShell)
- Windows: Bash tool permanently broken in long-lived sessions - inlined shell snapshot exceeds command-line length and is truncated
- [BUG] Background processes not cleaned up on session exit, causing "file in use" errors on app update
- [Feature Request] Allow users to request bash commands without agent auto-execution
- Spurious <<ccr:XXXXXXXX>> tokens injected into Bash tool output (grep/wc results), not present in source file
- [Bug] PowerShell parser fails on non-ASCII characters in first tool call due to codepage 932 encoding
- [BUG] v2.1.233 Windows: Claude Code silently exits immediately after Bash tool dispatch in a long/resumed session
- Bash tool: 'unexpected EOF' at wrapper line numbers (line 70-73) for structurally valid commands - structure-dependent, not length
- Windows: app update fails with 'application already in use' because session background processes survive app exit
- [BUG] Windows/Git Bash: Bash tool does not reap its child on timeout - orphans spin at 100% CPU and accumulate across sessions
- Tool-result stream injection: fabricated git output attempted to induce destructive git reset
- [BUG] Bash tool leaves 0-byte stray files in the working directory when commands contain shell metacharacters from source code (Windows / Git Bash)
- [DOCS] `[Bash tool] Windows crash when launch directory is deleted, locked, or unmounted mid-command is not documented`
- [BUG] Sandbox bash mount returns truncated/partial file reads (Cowork mode)
- Bash tool blocked (even read-only) when safety-classifier model is unavailable; dangerouslyDisableSandbox does not override
- [Windows] Bring back persistent terminal sessions to eliminate flashing console windows
- [Windows] Bring back persistent terminal sessions to eliminate flashing console windows
- Bash tool drops all stdout on Windows/Git Bash intermittently
- [BUG] Console window briefly flashes on every shell command execution (Windows)
- [BUG] Bash tool permanently broken with WSL2: unexpected EOF while looking for matching quote
- [BUG] Windows: polling a background task's output path with backslashes via grep silently hangs forever (no error)
- Skill execution fails when glob pattern contains backticks - shell command substitution bug
- PowerShell Tool on Win32: standard git flags with double dash (e.g. --ignore-all-space) trigger "Command uses stop-parsing token (--%)" false positive
- [Bug] Bash command fails with "unexpected EOF while looking for matching quote" when heredoc contains Korean text
- [BUG] Bash tool fails with EINVAL when project is on non-C: drive (Windows)
- permissions.deny Bash rules stop matching when the command contains a backslash inside double quotes
- [Desktop] Relative file links break after Bash `cd`: model uses new cwd, file pane uses session folder
- [Windows] Each prompt spawns 3–5 git.exe processes that each open a visible console window
- [BUG] defaultShell: "powershell" setting not honored on Windows — Bash tool fails
- [Bug] Bash tool heredoc parsing fails on Windows with CRLF line endings
- [BUG] Bash tool on Windows halves runs of backslashes, even inside single quotes and quoted heredocs
- [BUG] Windows Bash tool halves runs of backslashes even inside single quotes / quoted heredocs
- [BUG] Bash Renders full Private Key for deleted file
- [MODEL] Failed fetch skips worktree-path assignment; semicolon continues with empty path and triggers Git for Windows data loss
- [Bug] CLI sessions share bash execution state unexpectedly
- [Bug] Backgrounded processes via `cmd &` silently die when shell exits