Bash execution issues on Windows — page 3
Issues the maintainers labelled both platform:windows and area:bash.
254 issues · 53 open · 201 resolved (79%) · first seen Feb 23, 2026
Is this getting better or worse?
This class of problem is converging. 83 new reports in the last 90 days vs 130 in the 90 before — -36%. The open backlog peaked at 61 in 2026-04 and sits at 53 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 32 days across 201 closures. Of the 201 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 201–254
Ranked by community engagement (reactions weighted over comments).
- Bash tool blocked (even read-only) when safety-classifier model is unavailable; dangerouslyDisableSandbox does not override
- [BUG] Bash tool fails with exit code 127 for commands with Chinese characters in arguments on Windows (Git Bash)
- [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] Bash tool produces no stdout/stderr on Windows (working directory: C:\Projects\version)
- Scheduled/background task sessions hang on their 2nd shell command (desktop app, Windows 11)
- Windows: Git Bash shell-snapshot embeds raw Windows PATH unconverted, breaking short-name command resolution
- Windows/Git Bash: Bash tool PATH becomes Windows/Unix hybrid after a plugin/MCP connects mid-session, breaking node/git/coreutils
- [BUG] Working directory resets between tool calls
- Windows: Bash/PowerShell tool calls spawn visible conhost console windows (missing windowsHide)
- [BUG] Time discrepencies on Anthropic servers
- Windows: OPENSSL_Uplink crash when running Python cryptography package via Bash/PowerShell tools
- [BUG] Silent empty output on CJK paths (PowerShell/WSL2) is misjudged by the agent as negative confirmation ("file does not exist")
- [BUG] Windows/Git-Bash: harness bash -c wrapper wedges mid-session — every Bash tool command fails with "-c: line 111: unexpected EOF matching" (often silently); direct bash works
- Bash tool: foreground stdin is a held-open pipe — stdin-reading commands hang indefinitely and the timeout never fires (Windows/MSYS)
- Windows: repeated agent-driven Playwright runs leak orphaned Next.js (Turbopack) postcss.js workers — 1,220 processes / ~10 GB RAM
- [BUG] SessionStart hook env files (sessionstart-hook-N.sh) accumulate duplicate lines on re-run — never truncated; can escalate to null-byte Bash tool failure on Windows
- [BUG]
- Bash tool silently promotes long-running commands to background without warning
- 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
- Ran a destructive tinker/migrate:fresh command against the live app DB instead of an isolated test DB
- Feature request: elevated ("Run as administrator") option for code-block Run buttons on Windows
- [BUG] Bash auto-background-on-timeout eligibility is evaluated post-rewrite and undocumented — hook-rewritten long commands are killed at 2m instead of backgrounded
- [BUG] PreToolUse updatedInput replaces the whole tool input — sibling fields (timeout, run_in_background) silently dropped
- Windows Defender FileFix signature blocks the PowerShell tool's composed inline commands; surfaces only as bare 'EPERM uv_spawn pwsh.exe'
- [BUG] Shell snapshot silently truncated at ~7.2KB on Windows (Desktop) - every Bash call fails with unexpected EOF
- Bash tool_use hangs (seconds-to-minutes, sometimes indefinitely) on the first call after a context transition (session start, EnterWorktree, ExitWorktree)
- Windows/Git Bash: 85 per-function base64 evals make every Bash call pay ~5-9s; snapshot-creation 10s timeout silently forks sessions into fast/slow regimes
- Windows desktop: app crash mid-session kills background shell tasks with no completion record; preceded by MCP server disconnect/reconnect churn
- Bash tool spawns a login shell whose state it then discards — ~830ms per call
- Bash run_in_background tasks killed at turn boundary on MSYS2 MINGW64, and reported status does not match the process
- 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
- [BUG] Windows Git Bash: Bash tool brace-expands inside quoted strings and splits quoted paths containing spaces
- 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
- Windows: detached background pty hosts (--bg-pty-host --bg-spare) cause visible pwsh/console window flashes at session start
- [Windows] Bash tool permanently wedged: hook env (CLAUDE_ENV_FILE) grows on every compact, torn export line fails every command with "line 182: e: command not found" (exit 127)
- [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)
- [BUG] Sandbox bash mount returns truncated/partial file reads (Cowork mode)
- Background Bash tasks on Windows/Git Bash stay stuck as 'running' after the command has finished
- [Windows] Bring back persistent terminal sessions to eliminate flashing console windows
- [BUG] Windows: polling a background task's output path with backslashes via grep silently hangs forever (no error)
- Background job sessions on Windows get a broken/minimal PATH (literal unexpanded $PATH token)