[BUG] Error: Failed to spawn Claude Code process: spawn ... ENOENT

Status Closed — not planned
Maintainer reply None cached
Activity 11 comments · opened Oct 13, 2025 · closed Mar 4, 2026

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet
  • [x] This is a single bug report (please file separate reports for different bugs)
  • [x] I am using the latest version of Claude Code

What's Wrong?

<img width="459" height="605" alt="Image" src="https://github.com/user-attachments/assets/537dc3f1-4c17-4863-8749-e3bc84649078" />

What Should Happen?

It should work as usual. It cannot browse conversations from history or anything.

Error Messages/Logs

Steps to Reproduce

Just open the extension and here it is

Claude Model

None

Is this a regression?

Yes, this worked in a previous version

Last Working Version

_No response_

Claude Code Version

2.0.14

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

Terminal.app (macOS)

Additional Information

_No response_

View original on GitHub ↗

11 Comments

rudrabhoj · 9 months ago

Hey had been 3 weeks any update on this?

idomusha · 9 months ago

Possible Solution

I encountered the same error on Arch Linux in WSL:

Error: Failed to spawn Claude Code process: spawn /home/[user]/.vscode-server-insiders/extensions/anthropic.claude-code-2.0.50-linux-x64/resources/native-binary/claude ENOENT

What I tried (didn't work):

  • Verified binary exists at ~/.local/bin/claude
  • Logout/login
  • Uninstall/reinstall extension
  • Extension appeared installed but wasn't showing in the extension list when using @command:workbench.extensions.installLocalExtensions

What fixed it for me:

  1. Ctrl+Shift+P → "Connect to WSL using Distro..."
  2. Open workspace from File menu

Possible root cause: VS Code wasn't properly running in the WSL context, so it couldn't access the claude binary installed in the WSL filesystem.

Other installation details:

  • Installed Claude Code CLI with: curl -fsSL https://claude.ai/install.sh | bash
  • Binary location: ~/.local/bin/claude
  • claude --version shows: 2.0.50 (Claude Code)
  • no issue with CLI tool from terminal
austin-liminal · 9 months ago

I ran into the same thing.

The root cause was moving a folder in the root of my VSCode workspace to a different name (and not sure if related, but subfolder of another workspace).

What fixed it for me was removing the old, nonexistent folder from the workspace.

Right click --> Remove folder from workspace

github-actions[bot] · 8 months ago

This issue has been inactive for 30 days. If the issue is still occurring, please comment to let us know. Otherwise, this issue will be automatically closed in 30 days for housekeeping purposes.

OthmanAlshawabkeh · 7 months ago

@austin-liminal thank you 100%

AinzRimuru · 7 months ago

I'm still experiencing the same problem using VS Code on Windows.

I've confirmed that the .exe file exists, but the result is ENOENT.

jholdorff · 7 months ago

Same here

zubairrauf123 · 7 months ago

I'm experiencing the same issue on VS Code on the Mac - it works fine on one Mac and not on the other one.

  • I have verified the extension exists on the path /Users/[user]/vscode/extensions/anthropic.claude-code-2.1.20-darwin-arm64/resources/native-binary/claude.
  • I have verified that Gatekeeper is not blocking the extension

UPDATE: After about 3-4 hours and a restart, this is not longer erroring out

Zen-ctrl · 6 months ago

Guide: Fix “Failed to spawn Claude Code process … claude.exe ENOENT” on Windows (VS Code / Cursor)

Error text (typical)

Error: Failed to spawn Claude Code process:
spawn ...\anthropic.claude-code-<version>-win32-x64\resources\native-binary\claude.exe ENOENT

What this means

ENOENT during spawn means Windows cannot find (or cannot access) the executable at the exact path the extension is trying to run. Most commonly:

  • the claude.exe file is missing (partial install / stale extension folder reference)
  • security software quarantined or removed it
  • VS Code/Cursor is still running in the background and using cached state

This guide uses commands that work across machines by relying on environment variables and by having you paste the path shown in your error.

---

Step 1: Fully close the editor and kill background processes

Closing the window is not always enough. Kill any lingering processes.

In PowerShell:

taskkill /F /IM Code.exe 2>$null
taskkill /F /IM Cursor.exe 2>$null
taskkill /F /IM "Code - Insiders.exe" 2>$null

---

Step 2: Verify whether claude.exe exists (using the path from your error)

Copy the full claude.exe path shown in the error and paste it into this command:

$ClaudeExe = "PASTE_THE_PATH_FROM_THE_ERROR_HERE"
Test-Path $ClaudeExe

Interpretation:

  • If it returns False: the binary is missing. Go to Step 3 (Clean reinstall).
  • If it returns True: the file exists, but Windows may be blocking it or security may be interfering. Go to Step 4 (Security and execution checks).

---

Step 3: Clean reinstall (fixes missing/corrupted extension binaries)

3.1 Uninstall the Claude Code extension

In VS Code/Cursor: Extensions → search “Claude Code” → Uninstall.

3.2 Delete leftover extension folders (VS Code)

Run:

Remove-Item -Recurse -Force "$env:USERPROFILE\.vscode\extensions\anthropic.claude-code*" -ErrorAction SilentlyContinue

If you use VS Code Insiders, also run:

Remove-Item -Recurse -Force "$env:USERPROFILE\.vscode-insiders\extensions\anthropic.claude-code*" -ErrorAction SilentlyContinue

For Cursor, extension storage can differ by installation. The safest approach is:

  • use the exact folder shown in your error path
  • delete that specific anthropic.claude-code-... folder after uninstalling

3.3 Reinstall the extension

Reopen VS Code/Cursor and reinstall “Claude Code”.

3.4 Confirm the binary exists (VS Code default location)

Get-ChildItem "$env:USERPROFILE\.vscode\extensions\anthropic.claude-code*\resources\native-binary\claude.exe" -ErrorAction SilentlyContinue

If this returns a path, retry the extension.

---

Step 4: Security and execution checks (when Test-Path returns True)

4.1 Unblock the executable

If Windows marked it as downloaded/blocked:

Unblock-File $ClaudeExe

4.2 Try running it directly

This tests whether Windows can execute it:

& $ClaudeExe --version
  • If this fails, the issue is typically security/permissions/quarantine or a corrupted binary.
  • If this succeeds but the extension still errors, proceed to Step 5.

4.3 Check if security software quarantined it

If the file keeps disappearing after reinstall, check:

  • Windows Security → Virus & threat protection → Protection history
  • any corporate endpoint security/EDR logs

Restore/allow as required for your environment.

---

Step 5: Restart guidance and the correct way to relaunch

When to restart VS Code/Cursor

Restart the editor after any of the following:

  • installing/updating the extension
  • deleting extension folders
  • changing environment variables
  • killing background processes

When to restart the entire computer

Do a full Windows restart if:

  • you reinstalled/cleaned folders and the error persists
  • the extension still references a version folder that no longer exists
  • you changed environment variables and behavior still looks “unchanged”

A reboot clears background processes and forces Windows to reload environment variables and extension state.

Do not launch from a pinned taskbar icon (during troubleshooting)

Avoid opening VS Code/Cursor from a pinned taskbar shortcut while troubleshooting. Pinned launches can keep stale state alive via cached processes.

Preferred launch method

Use one of these:

  • Start Menu: Start → search “Visual Studio Code” / “Cursor” → open
  • Or from a terminal (recommended for testing):

``powershell
code .
``

Then open the Claude Code panel and retry.

---

Quick verification block (copy/paste)

After you paste the error path into $ClaudeExe, run:

Test-Path $ClaudeExe
Unblock-File $ClaudeExe -ErrorAction SilentlyContinue
& $ClaudeExe --version

If Test-Path is True and --version runs successfully, the executable is present and runnable. At that point, remaining failures are usually resolved by:

  • killing background processes (Step 1) and relaunching from Start Menu
  • clean reinstall (Step 3)
  • full computer restart (Step 5)

---

github-actions[bot] · 5 months ago

Closing for now — inactive for too long. Please open a new issue if this is still relevant.

github-actions[bot] · 5 months ago

This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.