HomeClaude CodeErrors › Exited with code 1
OverviewInstallCLI referencePricing & limitsAgent SDKSkills & pluginsGitHubWeb, desktop & IDEModelsErrorsOpen source?TutorialFor studentsQA automationvs Cursorvs Codex & OpenCodeSubagentsHooksMCPEcosystemVS CodeOpenRouterRate limits中文指南
Last updated: September 23, 2026

"Claude Code process exited with code 1": how to find the real error and fix it

"Claude Code process exited with code 1" is a wrapper's message: the VS Code extension or the desktop app started the claude CLI, and the CLI died before it could say why. The fix starts with getting the real error out of it.

TLDR

  • Run claude in a normal terminal — the CLI prints the actual error the wrapper hides.
  • Common causes: old Node.js / PATH, invalid settings.json, a stuck background session, orphaned processes on Windows.
  • claude doctor checks the install; reinstalling with the native installer fixes most broken ones.
  • Windows: if the app won't relaunch after a crash, a full restart clears the orphaned process lock.

Step 1: get the real error

claude --version    # is the CLI there at all?
claude              # start it directly: the real error prints here
claude doctor       # install health check

If the terminal works and only the extension or app fails, the problem is the environment the wrapper launches from (PATH, Node version, proxy variables) — not Claude Code itself. If the terminal fails too, the message it prints is the one to search for.

Known causes (from the issue tracker)

  • Resuming a background session in VS Code. Opening a session started with claude --bg throws exactly this error — reported on macOS, Windows and Linux (#77162). Stop the background agent first, or open a new session.
  • Windows: orphaned process after a crash. The app can't relaunch because an old process still holds a lock (#42776, #53247). Kill leftover claude processes in Task Manager; the reliable fix reported there is a full Windows restart.
  • Desktop app on Apple Silicon failing on every session start while the CLI works (#59866, a duplicate of a known issue) — update the app; in the meantime use the CLI in a terminal.
  • Node.js below 18 or a broken PATH after an npm install — the wrapper can't start the CLI. node -v; switch to the native installer to remove the Node dependency.
  • Invalid `~/.claude/settings.json`. A stray comma in a hooks or permissions block makes the CLI exit immediately. Validate the JSON.
  • Windows shell mismatch — a PowerShell tool failing from Git Bash with a specific model (#87980); try the other shell.

If nothing above applies

  • Update everything: claude update, and update the VS Code extension or desktop app.
  • Reinstall with the native installer (curl -fsSL https://claude.ai/install.sh | bash, or the PowerShell / CMD one-liners in the install guide).
  • Start VS Code from a terminal so it inherits the same environment as the working CLI.
  • Open a new issue with the output of claude doctor — the tracker triages crashes quickly.

Related

If Claude Code starts but then fails with an API error, that's a different problem: see API Error 500, overloaded / 529, API Error 400 or OAuth errors. For the extension specifically, see Claude Code in VS Code.

Frequently asked questions

What does 'Claude Code process exited with code 1' mean?

The VS Code extension or desktop app launched the Claude Code CLI and it exited with an error. Run claude in a terminal to see the actual error message.

How do I fix Claude Code exited with code 1 on Windows?

Kill leftover claude processes (or restart Windows if the app won't relaunch), check node -v and PATH, validate ~/.claude/settings.json, and reinstall with the native installer if needed.

Why does Claude Code work in the terminal but not in VS Code?

VS Code launched with a different environment (PATH, Node, proxy variables). Start VS Code from the terminal where claude works, or fix the variables in your shell profile.

Run Claude Code on the gateway

Same models, two environment variables, credits at 7.69× face value — or a flat-rate unlimited plan.

Get an API key See unlimited plans

AI Prime Tech is an independent API gateway and is not affiliated with, endorsed by, or sponsored by Anthropic. “Claude” and “Claude Code” are trademarks of Anthropic. Claude Code features described here follow Anthropic’s public documentation at the time of writing and change frequently; prices and model lists on this page are read from this gateway’s live settings.

More Claude Code guides

Claude Code errors and how to fix themClaude Code "API Error: 500": what it means and what actually fixes itClaude "Overloaded" error (API Error 529): what it means and what to doClaude Code API Error 400: prompt is too long, tool use concurrency, and the restClaude Code OAuth errors: timeout of 15000ms exceeded, and status code 500