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 --bgthrows 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
claudeprocesses 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 plansAI 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.