Bash execution issues on VS Code
Issues the maintainers labelled both platform:vscode and area:bash.
62 issues · 13 open · 49 resolved (79%) · first seen Feb 23, 2026
Is this getting better or worse?
This class of problem is converging. 16 new reports in the last 90 days vs 25 in the 90 before — -36%. The open backlog peaked at 16 in 2026-04 and sits at 13 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
40 of these reports name the Claude Code build they were running, spanning 35 releases. Heaviest reporters:
- Claude Code v2.1.79
- Claude Code v2.1.270
- Claude Code v2.1.148
- Claude Code v2.1.158
- Claude Code v2.1.288
- Claude Code v2.1.287
- Claude Code v2.1.282
- Claude Code v2.1.276
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 36 days across 49 closures. Of the 49 closures with a recorded reason, 10% were closed as completed and 44 as not-planned or duplicate. The most recent completed fix landed in 2026-08.
Workarounds reported by the community
21 of these issues post a workaround someone says worked. The highest-engagement ones:
- [BUG] Bash comments break permissions
- Workaround: a PreToolUse hook can strip the comment lines before permission matching sees them. The hook reads the command, removes leading lines, and returns the clean command via . Your allowlist then matches correctly…
Found in the thread of #29582 · resolved - [Bug] Parallel tool calls hang on Bash execution errors
- …ocks → 400 wedges session), 63364 (full softbrick example). Workaround that holds: stay on 4.7, or set on 4.8 to remove parallel batches entirely (sequential, slower, but no cascade possible).
Found in the thread of #63881 · resolved - [BUG] Bash tool persistently returns exit code 1 with no output in Claude Code session
- …te to a file, read it back with the Read tool" as a working workaround. That does not work here: echo BASH TEST OK <scratchpad /bashtest.txt; echo done printf 'WRITE TEST %s\n' "$$" <scratchpad /bashtest2.txt 2 /dev/null…
Found in the thread of #93838 · still open - [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)
- …rom last-known-good instead of caching the poisoned script. Workarounds we applied (user side) - Hook now skips env writes when and batches all exports into a single atomic append — no recurrence since. - Recovery when w…
Found in the description of #78146 · still open - [BUG] VSCode extension: Bash tool does not capture stdout (commands run in popup terminal window)
- …err is swallowed — failed commands return no output at all. Workaround: Redirect to a file and use the Read tool: git status c:/Users/me/out.txt 2 &1 then Read the file This works but adds friction to every shell operati…
Found in the description of #31449 · 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 1–62
Ranked by community engagement (reactions weighted over comments).
- [BUG] Bash comments break permissions
- [Bug] Parallel tool calls hang on Bash execution errors
- Doing useless tool call wasting token
- [BUG] Claude 2.1.71 Security False Positives
- VSCode Extension: Interactive terminal integration (write to and read from VSCode terminal)
- [BUG] Bash tool bypasses settings.json path deny rules — shell commands not subject to file tool access controls
- [BUG] Bash tool persistently returns exit code 1 with no output in Claude Code session
- [BUG] Permission parser treats # in multi-line quoted strings as shell comments
- grep -r and cp -r still bypass Read() deny rules on 2.1.259 (changelog fix does not reproduce; Windows/VS Code extension)
- [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] Bash tool hangs and executes as background tasks in VSCode Copilot harness
- [BUG] Cypress commands are not performing properly in the VS Code native UI
- [BUG] rm -rf with unexpanded ${LOCALAPPDATA} in bypassPermissions deletes real system directory
- [BUG] VSCode extension: Bash tool does not capture stdout (commands run in popup terminal window)
- [BUG] [Windows] Bash tool causes BSOD (SYSTEM_SERVICE_EXCEPTION) on Windows 11 with HVCI enabled
- [BUG] SSHFS/network drive mounts fail directory validation in v2.1.82+ (regression from v2.1.81)
- [BUG] Unbounded memory usage in LXD VMs where tool calling is used (CLI + VSCode Extension)
- [BUG] `Bash(git diff)` truncating hunks
- [BUG] VS Code extension crashes with exit code 1 on every Bash tool invocation (Windows)
- [MODEL] Sonnet 4.5 Generates bash non Claude format wildcard glob patterns into settings.json
- Shell variable expansion broken in piped commands due to HLD tokenizer re-quoting
- Session-env snapshot file breaks when sourced: unquoted LS_COLORS/SSH_CONNECTION/LESSCLOSE spam 'command not found' on every Bash call
- [BUG] It seems that Claude Code on Antigravity is not using windowsHide: true / CREATE_NO_WINDOW while running bash, grep, read, etc.
- [BUG] Bash tool: env vars with spaces in values cause zsh startup errors
- Bash tool wedges into 'Stream closed' state after long-running subprocess
- Shell snapshot overrides `.zshenv`, breaking cwd-aware shell setup
- Bash tool: EUNKNOWN uv_spawn error on Windows (all shells fail)
- ELECTRON_RUN_AS_NODE leaks into Bash tool on Windows, breaks Electron app launches
- [BUG] Bash permissions are ignored
- Bash tool: unquoted temp path causes 'Permission denied' on Windows with spaces in VSCode path
- [BUG] VS Code extension stuck on Bash polling command after the shell exited; Stop button does nothing
- Windows/Git Bash: session's Bash tool dies permanently (unalias: unsetenv, then "completed with no output") and does not recover on resume
- Windows: background Bash tool processes orphaned across sessions (block Git installer, leak resources)
- [BUG] Working directory resets between tool calls
- [BUG] Regression in 2.1.183 (VS Code extension, Remote-WSL): long-running child processes spawned by the Bash tool are killed/reaped — works in 2.1.181
- [BUG] Unable to use Bash tool.
- Benign `node -e` regex script false-flagged as "Fork bomb detected"
- [FEATURE] run Bash commands in VSCode integrated terminal for real-time visibility
- [BUG] CRITICAL: Bash permission gate bypassed for compound `rm -rf … && … | … ; echo …` commands in default mode (no allow-list match, no prompt shown, reproduced on 2.1.139)
- [BUG] claude code can't access external projects if running via sandboxed environment
- Bash tool: env vars leak into spawned shells as literal string "undefined"
- [BUG] Claude Code violated .gitignore/.claudeignore policy by reading .env file using Bash cat command in auto-approve mode
- [BUG] vs code windows bash terminal integration
- [BUG] Shell not found on Windows even with SHELL env variable set
- Claude Code cannot establish TCP connections to local network hosts — No route to host (while iTerm2 succeeds)
- Windows Git Bash: process crash (exit code 4294967295) after successful shell snapshot
- [BUG] Shell snapshot produces syntax error and broken PATH when launched from VS Code Remote-WSL with .venv/ in workspace
- permissions: Bash(rm -r:*) does not match rm -rf
- Permission deny rules can be bypassed via Bash recursive grep and Glob filename listing
- Opened by mistake
- 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
- Bash tool: 'unexpected EOF' at wrapper line numbers (line 70-73) for structurally valid commands - structure-dependent, not length
- [BUG] Bash tool permanently broken with WSL2: unexpected EOF while looking for matching quote
- Fable 5.1 Extra High ultra code
- [Bug] CLI sessions share bash execution state unexpectedly
- [BUG] Critical: git stash pop + reset --hard destroyed ~600 lines of new code and unrelated stash in worktree session
- [Bug] File overwrite without existence check in bash auto mode
- Blank terminal window pops open on every Bash/PowerShell tool call after updating to 2.1.271 (Windows)
- [BUG] git diff --unified=0 / -U0 triggers a permission prompt despite being read-only
- Worktree isolation refuses read-only commands with no git invocation; measured cost is command fragmentation, not the refusals
- Unexplained <claude-code-hint> lines injected into background Bash log output, referencing a nonexistent plugin, paired with an instruction to withhold this from the user