spawn ENOENT / command not found — page 2
A shell or tool binary was not on PATH when Claude Code tried to run it.
506 issues · 58 open · 448 resolved (89%) · 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. 92 new reports in the last 90 days vs 154 in the 90 before — -40%. The open backlog peaked at 58 in 2026-08 and sits at 58 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
254 of these reports name the Claude Code build they were running, spanning 122 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 4 days across 448 closures. Of the 448 closures with a recorded reason, 23% were closed as completed and 344 as not-planned or duplicate. The most recent completed fix landed in 2026-08.
Workarounds reported by the community
217 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 506 matches; the statistics above cover all 506.
- [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
- 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.
- [BUG] PreToolUse hook that fails to launch is treated as a deliberate deny — exit-code 2 collision causes unrecoverable tool lockout
- 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:
- [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] 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)
- test-hook.sh reports valid JSON as invalid when jq is not installed
- [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
- 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
- [Bug] Orphaned plugins execute hooks despite being uninstalled
- Windows installer silently fails on clean machines without VC++ Runtime
- [Bug] Claude Code generates misleading or false information
- [BUG] bash negation fails in bash mode with grep (`if ! grep` does not parse correctly)
- [BUG]
- [BUG] @ file mention fails to find .py files in VSCode/Cursor extension when system rg binary is not installed
- [BUG] **Bug: Claude Code for VS Code 2.1.51 - Webview fails to load on Windows (Service Worker + Activation Error)**
- [BUG] [Bug] Extension fails to activate on Windows v2.1.51 - hardcoded Linux path in sdk.mjs causes TypeError
- winget upgrade breaks PATH - claude.exe moved to .local\bin without updating PATH
- Bash tool escapes curly braces in eval, breaking shell syntax
- [FEATURE] Human-readable error banners for Claude-Desktop extensions
- Hooks fail with posix_spawn '/bin/sh' ENOENT without sandbox enabled
- [BUG] Cowork Windows - HcnCreateEndpoint fails with Element not found + macOS diagnostic code running on Windows
- [BUG] MCP server spawning fails for some .bat/.cmd files on Windows
- [Bug] Keyboard shortcut M+1 unexpectedly cancels dialog
- Windows: SessionStart hooks with .sh scripts fail due to path handling
- cygpath command not found in Git Bash (MINGW64) on Windows
- install.sh appears stuck during download and fails silently when installMethod=native exists
- [DOCS] Inaccurate verification command in JetBrains troubleshooting for non-NPM installs