Skip to content
AI Dev Toolkit.
Esc
  • Loading…

Claude Code · Install and setup

Error: Claude Code process exited with code 1

“Claude Code process exited with code 1” means the CLI behind VS Code, an IDE or an SDK app crashed. How to find the real error under it and fix it.

Message

The exact error

Claude Code
Error: Claude Code process exited with code 1

Also appears as:

VS Code output log
[error] Error from Claude (on channel <id>): Error: Claude Code process exited with code 1
JetBrains Claude Agent (ACP)
Failed to initialize ACP session. Error: Internal error: "Claude Code process exited with code 1"
Agent SDK (TypeScript)
Claude Code process exited with code 1. stderr: <tail of the CLI's stderr>
Agent SDK (Python)
Command failed with exit code 1 (exit code: 1) Error output: Check stderr output for details
Windows native build, at the end of a turn
Error: Claude Code process exited with code 4294967295

Meaning

What does “Claude Code process exited with code 1” mean?

The VS Code extension, the JetBrains plugin, Claude Desktop’s Cowork and Agent SDK apps don’t run the model themselves: each starts the claude command-line program in the background and talks to it. When that program stops with a non-zero exit code, the wrapper can only report the code. Code 1 just means “failed”; Anthropic’s error reference says the exit code alone doesn’t say what went wrong. The real error is in the process’s own output, which the wrapper appends to the message when it captured any and otherwise keeps in its logs.

Causes

Why does the Claude Code process exit?

  • A sign-in problem the background process can’t show you, such as an expired login or a rejected API key
  • A broken or half-updated install, or the wrapper finding an old claude on PATH
  • An invalid settings file, MCP config or hook that stops the CLI at startup
  • A network, proxy or certificate error at the first request
  • On Windows, the native build exiting with 4294967295 at the end of a turn; current extensions close that quietly and your next message resumes

Fix

How do I fix “process exited with code 1”?

  1. Read the underlying error

    In VS Code, follow the View output logs link shown with the error, or open the Output panel and pick the Claude Code channel. The lines just before process exited with code 1 usually name the real failure, which you can then look up in the Claude Code error list.

  2. Run claude in a terminal in the same project

    The failure usually reproduces there with its full message, for example Not logged in or Invalid API key. Fix that error and the extension starts again.

    Terminal, from the project folder
    claude
  3. Check the install

    Run claude doctor, which checks the installation and configuration. If claude --version prints an older version than you expect, or claude isn’t found at all, see command not found: claude.

    Terminal
    claude doctor
    claude --version
  4. Update Claude Code and the extension

    Run claude update, update the extension, then restart the editor. Some reports, such as GitHub issue #8557, began right after an extension update, and on Windows v2.1.273 stopped showing the error for the harmless end-of-turn exit.

  5. In an Agent SDK app, catch it

    In TypeScript the exit rejects the for await loop over query() with a plain Error, so wrap the loop in try/catch. In Python it raises ProcessError, whose Error output line is fixed text, not the CLI’s output. In both, pass a stderr callback in the options and log what it receives: that’s the real error.

Explained

Where does this error appear?

Mostly in editors and apps that wrap the CLI: the VS Code extension, the JetBrains plugin, Claude Desktop’s Cowork and programs built on the Agent SDK. You won’t see it when you run claude yourself in a terminal, because there you get the underlying error directly. That’s why running claude in the same folder is the quickest way to find out what’s wrong.

If your settings or hooks are the trigger, the settings.json builder and the hooks builder produce files that validate, and the hooks guide explains how a failing hook behaves.

FAQ

Questions people ask

What does exit code 1 mean in Claude Code?

Exit code 1 is a generic failure signal: the claude process stopped because something went wrong, but the code doesn’t say what. The specific error is in the process output. Open the extension’s output logs or run claude in a terminal in the same project to see the actual message.

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

The extension can start a different claude than your terminal, or run without your shell profile’s environment variables, such as a proxy setting, an API key or a PATH entry. Check the extension’s output log for the failing path or message, set environment variables at user level rather than only in your profile, and restart VS Code.

Will reinstalling the extension fix “process exited with code 1”?

Sometimes, when the cause is a corrupted or outdated install, but often not, because the cause is usually sign-in, settings or the network. Find the real error first: it takes a minute in the output log and saves deleting configuration you may need.

Is “process exited with code 4294967295” the same error?

It’s the same wrapper message with a different code. On Windows the native build can exit with 4294967295 right after a turn completes. Since v2.1.273 the VS Code extension closes the session quietly when that happens at a turn boundary, and your next message resumes the conversation, so update if you still see it.

Related

Search all Claude Code errors

Keep exploring