spawn ENOENT / command not found — page 2
A shell or tool binary was not on PATH when Claude Code tried to run it.
525 issues · 43 open · 482 resolved (92%) · first seen Feb 24, 2025
First response · integration
What to do now
Most likely: A local integration or child process did not satisfy Claude Code’s expected contract.
- Isolate the failing MCP server, shell command or editor integration.
- Run that dependency directly and capture its exit code and stderr.
- Compare with a clean configuration before editing global settings.
These are conservative triage steps, not an official Anthropic fix. Use the issue and workaround evidence below before making a destructive configuration change.
Is this getting better or worse?
This class of problem is converging. 59 new reports in the last 90 days vs 125 in the 90 before — -53%. The open backlog peaked at 58 in 2026-08 and sits at 43 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
266 of these reports name the Claude Code build they were running, spanning 132 releases. Heaviest reporters:
- Claude Code v2.1.51
- Claude Code v2.1.129
- Claude Code v2.1.136
- Claude Code v2.1.42
- Claude Code v2.0.76
- Claude Code v2.1.123
- Claude Code v2.1.7
- Claude Code v2.1.90
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 14 days across 482 closures. Of the 482 closures with a recorded reason, 22% were closed as completed and 377 as not-planned or duplicate. The most recent completed fix landed in 2026-09.
Workarounds reported by the community
223 of these issues post a workaround someone says worked. The highest-engagement ones:
- [FEATURE] .NET 9 or 10 SDK support in Claude Code for web runtime environment
- …environment Share a roadmap for future SDK version updates Workaround: Currently, users need to either downgrade their projects to .NET 8 or build locally/in CI/CD pipelines. Thank you! Proposed Solution install .Net la…
Found in the description of #11627 · resolved - Shell Function Inheritance Issue - Zoxide and Dynamic Functions Fail in Bash Tool
- …n Code When runs, it generates shell functions like: Failed Workarounds Attempted 1. Manual function definition : Functions defined but not accessible 2. Re-sourcing ~/.zshrc : No effect in Claude Code context 3. Direct…
Found in the description of #2407 · resolved - SSH remote connection fails on Windows — hardcoded /usr/bin/ssh path
- I've tried these commands as a workaround but got another error:
Found in the thread of #25659 · resolved - [BUG] Native Windows(Powershell) install of Claude Code is not viable
- Ran into this same issue tonight. Found workarounds that might help others: The binary does exist It's bundled inside the VS Code extension: Workaround Open a new PowerShell window and should work. Note: When the VS Code…
Found in the thread of #14902 · resolved - Bug: claude command not found after npm install -g on macOS with Homebrew due to incorrect symlink
- …JavaScript file instead of the executable launcher script. Workaround The issue can be resolved by manually replacing the incorrect symbolic link with the correct one. 1. Remove the incorrect link: 1 rm /opt/homebrew/bi…
Found in the description of #3172 · 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 525 matches; the statistics above cover all 525.
- Shell snapshot captures base64-encoded functions from git-completion.bash, breaking all Bash commands on Windows
- Windows activation failure: createRequire invalid file URL breaks command registration in 2.1.51-2.1.53
- [BUG] Extension fails to activate on Windows - hardcoded Linux path in extension.js
- VS Code extension v2.1.51 fails to activate on Windows - hardcoded Linux CI paths in extension.js
- [BUG] Previous sessions not showing in desktop app sidebar
- Shell snapshot breaks zoxide cd wrapper - __zoxide_z not found
- Ralph Loop plugin: stop-hook.sh fails on Windows - cat command not found
- [BUG] Claude Code Bash tool incompatible with MSYS/Git Bash on Windows (requires cygpath)
- Bash Command Execution Fails on Windows with Cygpath Not Found
- [BUG] Claude Code VSCode Extension v2.1.136 Fails to Activate on Windows Due to Hardcoded CI Build Path
- Code mode hangs silently on all models and sessions on Windows desktop app after May 4 Opus 4.7 incidents
- [BUG] Command suggestions with line continuations have trailing whitespace after backslashes
- Grep tool: spawn 'rg' ENOENT on macOS v2.1.96 (regression of #15026)
- [BUG] CLI binary path breaks on every VS Code extension update (needs stable path/symlink)
- [BUG] Shell snapshot generates unquoted PATH on macOS with spaces in home directory
- Bash tool: shell-quote mangles { }, heredoc markers, and $ in piped commands
- VS Code extension commands not working - "command not found" errors
- [BUG] Cowork Windows 11 Pro: Persistent HcnCreateEndpoint 0x800706bf failures, ghost NAT entries, macOS diagnostics on Windows
- [BUG]
- [Bug] Claude ignores CLAUDE.md virtual environment directives despite loading file at session start
- [Windows] Hook execution uses 'bash' instead of detected full path, fails when Git\bin not in PATH
- claude install doesn't persist ~/.local/bin to PATH in shell config
- [BUG] Double Ctrl+C deleted claude.exe, install.ps1 failed to reinstall (Windows)
- Slash Command Not Found: Code Review Script Fails to Load
- [BUG] Windows/Git Bash: shell snapshot silently writes the raw Windows PATH when the PATH probe times out, so ls/grep/date are "command not found" for the whole session
- [BUG] PreToolUse hook that fails to launch is treated as a deliberate deny — exit-code 2 collision causes unrecoverable tool lockout
- [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)
- Plugin MCP relative headersHelper resolved against session CWD, not plugin root
- Hooks fail with "posix_spawn '/bin/sh' ENOENT" when the session cwd is deleted (worktree cleanup); spawn should fall back to an existing cwd
- [Bug] grep shell wrapper silently overrides -E (ERE) with -G (BRE) via ugrep — breaks scripts using extended regex
- Add `nu` (nushell) as a supported value for `defaultShell`
- Windows: PowerShell commands incorrectly routed to Bash tool, causing crash
- [BUG] v2.1.136 conflicts with GitHub Copilot extension — claude-vscode.terminal.open command not found
- claude-vscode.editor.openLast not found — extension fails to activate on Windows due to hardcoded Linux CI path
- Shell snapshot filters _-prefixed functions, breaking dependent exported functions (GVM _encode/_decode)
- Stdio MCP server cwd field silently ignored on Windows (2.1.123)
- Shell snapshot $PATH not expanding — commands not found in Bash tool
- [Bug] Anthropic API Error: Overloaded
- [BUG] Claude Code VS Code extension v2.1.55 - All commands return "not found" error, extension fails to activate
- [BUG] [Windows] Extension fails to activate - hardcoded Linux path causes TypeError
- Shell snapshot corruption on Windows (Git Bash/MSYS2) - pipe buffer truncation
- mcp-cli call fails with 'command not found' when tool argument contains a slash (server/tool)
- /bin/sh ENOENT: Bash tool silently breaks mid-session
- [BUG] Cowork VM never creates on Windows — connection timeout + macOS diagnostics running on Windows
- [Bug] Usage limits not synced between Claude Code CLI and web UI, blocking continued use at rate limit
- [BUG] - CLI is insisting an upgrade is required
- [BUG] Stop hooks fail with 'spawn /bin/sh ENOENT' on session end
- [BUG] cygpath: command not found error when running Claude Code in PowerShell/Windows Terminal
- [BUG] Skill parser executes `!` inside markdown backticks as bash commands
- Slash commands with hyphens in filename not recognized (v2.0.76)
- [BUG] Shell snapshots capture interactive functions without dependencies, breaking cd and other commands
- Bash tool can't cope with variable assignments
- Claude installed and worked once but then will not run again.
- A PreToolUse hook can be inert with no signal anywhere: a missing script fails open, and nothing detects a rule whose matcher was never registered
- [BUG] Bash tool broken on Windows: /usr/bin/bash: -c: line 26: unexpected EOF while looking for matching backtick
- [BUG] Installer places binary in VS Code Snap directory, leading to silent uninstallation on Ubuntu
- Remote Claude Code session (desktop app): GitHubPrManager spawns local `gh` with remote cwd → misleading ENOENT
- Sub-agent attempts `exit_plan_mode` as Bash command, fails with Exit code 127
- [BUG] Claude Code VS Code extension fails to activate on Windows with error:
- Bash tool on Windows Git Bash cannot find common binaries (git, task, ls) after 2.1.x update
- [Bug] Missing /buddy Command - Command Not Found
- [BUG] Claude Code executed rm -rf /* on production VPS due to SSH variable escaping error
- [DOCS] Claude cli on mac prompts to update via brew but is checking current version via npm
- [BUG] Sandbox creates directories in CWD from Bash tool command arguments when command is not found
- statusline-setup should detect user's shell and generate appropriate script
- [BUG]
- False-positive "installMethod is native" warning after removing native install — Homebrew binary fires on every start
- [BUG] Sandboxed bash does not recognize `!` and gives "command not found"
- [Bug] Anthropic API Error: Text content blocks contain only whitespace
- [BUG] Shell snapshot overwrites PATH, breaking Homebrew tools (node, npm, gh)
- [BUG] VS Code extension auto-install fails when VS Code is not installed
- [Bug] Git Bash PATH format mismatch on Windows prevents command execution
- [BUG] Installation failing on Windows 11 Pro
- [BUG] FIX - Claude Code v2.0.x has trouble shelling Git and reports cannot find 'cygpath'
- [BUG] claude: command not found
- windows cmd error: -4058, code: 'ENOENT' syscall: 'spawn /bin/bash'
- [BUG] VS Code extension: ripgrep resolver discards its own probe and returns bare `rg`, silently degrading every @-mention search to a 100-result unranked fallback
- security-guidance: sg-python.sh discards probe stderr, misreporting any failing interpreter as 'no working Python 3'
- Bash tool: "wc" via command substitution fails with "command not found" inside a for-loop with 2+ items
- [BUG] Windows: "Another program is using this file" after in-app update — happens even when quitting cleanly from the system tray (1.25927.0.0 → 1.26832.0.0)
- remote-control server spawns sessions via its resolved install path — every auto-update breaks new-session spawns with ENOENT until the server is restarted
- [BUG] Windows: Bash tool silently corrupts written file content via command substitution and reports exit code 0
- test-hook.sh reports valid JSON as invalid when jq is not installed
- Plugin commands not available in background sessions
- [BUG] Desktop App stuck on "Claude will return soon" with error 093O2GW on macOS
- CLAUDE.md rules aren't reliably followed; PreToolUse hooks are a partial, hand-rolled stopgap
- Sandboxed Bash commands get a spurious backslash before `!` (shell-quote re-escapes the eval wrapper)
- [BUG] Windows/Cowork: built-in Node.js not used for local MCP plugin servers → spawn node ENOENT (Windows repro of #35175)
- Bash tool: PATH not Windows->POSIX translated when MSYS bash subprocess respawns mid-session
- Cowork: Host-Mac AppleScript bridge for native macOS app integration
- Model fabricated a command in technical repro steps instead of using known context
- [BUG] FleetView dispatched agents doesn't properly use the correct version when dispatching an agent with an up to date version while an existing previous version is running on the background
- [BUG] Extension fails to activate on Windows — hardcoded Linux path in v2.1.136
- [BUG] 2.1.129 install subcommand intermittently fails to create ~/.local/bin/claude
- Shell snapshot still drops underscore-prefixed zsh helper functions in v2.1.112 (recurrence of #40602)
- [BUG] Claude continually asks for permission, even after selecting yes, always allow.
- VSCode extension 2.1.117: @ file picker returns 'No files found' when system rg is not installed (bundled rg not used, findFiles fallback also fails)
- [Bug] Claude command not found despite PATH configuration
- [BUG] preview_start always fails on Windows desktop app with "cwd must be a relative path within the project root"
- Bash tool non-functional on Windows: no executables found in PATH