Bash execution issues on Windows — page 2
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 101–200
Ranked by community engagement (reactions weighted over comments). Listing the top 300 of 335 matches; the statistics above cover all 335.
- [BUG] Claude Code executed rm -rf /* on production VPS due to SSH variable escaping error
- [BUG] rm -rf with unexpanded ${LOCALAPPDATA} in bypassPermissions deletes real system directory
- [BUG] No Bash output - Claude Code v2.1.74 (desktop app)
- Windows: /exit does not terminate child bash.exe processes — orphaned shells cause system-wide slowdown
- [BUG] VSCode extension: Bash tool does not capture stdout (commands run in popup terminal window)
- [BUG] Claude Code repeatedly uses Bash syntax (extglob) on Windows PowerShell and fails to adapt
- [Bug] Shell tool fails with EINVAL error on Windows temp directory access in v2.1.53
- [BUG] Windows: the Bash tool halves every backslash pair in a command before Git Bash parses it (heredocs and single quotes included)
- Windows: Bash tool silently truncates the wrapped command at 8,186 chars, so commands don't run, run partly, or dump the environment
- 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)
- 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
- [BUG] Claude Desktop (MSIX) bundled bash leaks TEMP=/tmp into child JVMs, breaking Gradle and any Java Selector.open() on Windows
- [BUG] Bash tool hangs indefinitely when 2>&1 combined with pipe — regression in 2.1.x, high frequency with non-Anthropic backends
- [BUG] [Windows] Bash tool causes BSOD (SYSTEM_SERVICE_EXCEPTION) on Windows 11 with HVCI enabled
- [FEATURE] Support explicitly specifying location of pwsh.exe
- [Bug] Sub-agent recursive delete via typo'd path destroys codebase on NTFS
- [BUG]
- [BUG] Windows: pwsh.exe stdout/stderr not captured by PowerShell tool or via Bash tool, both via app alias and direct path; powershell.exe works fine in same session.
- [BUG] STACK DUMP
- [BUG] Claude constructs &&-chained command with ||-tolerant loop + trailing rm -rf, swallowing failures and wiping working tree
- [FEATURE] Powershell default to 5.1 or add option to use 5.1
- [BUG] SSHFS/network drive mounts fail directory validation in v2.1.82+ (regression from v2.1.81)
- Bash tool non-functional on Windows: no executables found in PATH
- [Bug] Permission allow rules not applied for Bash(mkdir) in skill contexts and default mode
- [BUG] Windows 11 ARM64: CLAUDE_CODE_GIT_BASH_PATH not recognized with ARM64 Git for Windows, space-free path
- [BUG] Bash deny rules appear non-recursive for nested execution contexts ($(), backticks, subshell, eval, PowerShell wrapper)
- [Feature Request] Shell command tab completion for ! prefix commands
- [BUG] VS Code extension crashes with exit code 1 on every Bash tool invocation (Windows)
- [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
- [Bug] Windows: Bash tool silently truncates commands over ~8K chars (each ' counts ~5) and collapses \\ to \ in quoted heredocs
- [Bug] Heredoc syntax not supported on Windows PowerShell despite explicit rules to prevent usage
- [Bug] Windows/Git Bash: corrupted shell snapshot (serialized git-completion functions) makes every Bash tool call exit 127 with no output
- [MODEL] Uses PowerShell here-string (@'...'@) inside the Bash tool on Windows, silently corrupting a git commit message
- Windows: detached background pty hosts (--bg-pty-host --bg-spare) cause visible pwsh/console window flashes at session start
- [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] 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]
- sed on Windows silently converts CRLF to LF, breaking files
- 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
- 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*"
- [Bug] Bash tool calls hang before dispatch on Windows desktop; Stop ignored until claude.exe killed
- [BUG] Windows / Desktop Code tab: Bash `cd` into an additional working directory silently re-targets the session's primary working directory (Workflow scripts land under another project's slug)
- [BUG] Subagent ran rm -rf \ via PowerShell → MSYS2 bash (PowerShell expanded the escaped variables to empty), wiping C:\ top-down on Windows
- Windows/Git Bash: session's Bash tool dies permanently (unalias: unsetenv, then "completed with no output") and does not recover on resume
- Windows: Bash tool commands auto-backgrounded on timeout are never cleaned up when the session ends, allowing orphaned processes to leak OS handles/kernel pool for days
- PowerShell/Bash tool calls spawn a visible, focus-stealing console window on Windows
- 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]
- [BUG] Bash tool fails with exit code 127 for commands with Chinese characters in arguments on Windows (Git Bash)
- [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: 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] Unable to use Bash tool.
- [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