What is the exact message?
Error: Claude Code process exited with code 1The number changes with the failure, so the message you see may name any non-zero code. In the TypeScript SDK the same failure carries the CLI's stderr after it:
Claude Code process exited with code 1. stderr: <tail of the CLI's stderr>What does it mean?
The underlying claude process exited with a non-zero code. This is a wrapper or IDE error: the program that launched Claude Code prints it, rather than Claude Code itself. The wrapper is usually the VS Code extension; another launcher, such as a CI job or an Agent SDK application, keeps the same output in its own logs.
Anthropic is explicit that the exit code alone does not say what failed. The real error is in the process's own output, which the wrapper appends when it captured any and otherwise keeps in its logs.
What causes it?
- The CLI hit an error it reported and then exited. When it reported an error result before exiting, the SDKs replace the exit message with
Claude Code returned an error result: <the CLI's own error report>, and that report is the place to start. - The CLI exited without reporting anything. Then the wrapper only has the code and whatever the process wrote to stderr.
- On Windows, a turn-boundary exit. Anthropic documents the native build exiting with code
4294967295right after a turn completes. At a turn boundary with no message waiting and no background task running, the VS Code extension closes the session quietly instead of showing the error, and your next message resumes the conversation.
How do I find and fix the cause?
- Read the process's output first. In VS Code, follow the View output logs link shown with the error, or run Claude Code: Show Logs from the Command Palette. The entry around the exit carries the real failure.
- Reproduce it in a terminal. Run
claudein the same project. A failure that keeps ending the process usually reproduces there with its real message, which you can then look up. - Check the installation. Run
claude doctorin a terminal to check the install and the configuration. - In an Agent SDK application, catch the error around your message loop. Pass a
stderrcallback in the query options so you capture the whole stream, not just the tail the message shows. - On Windows at a turn boundary, update to v2.1.273 or later if you are seeing the error every turn; Anthropic says the extension stopped showing it for that exit once nothing was lost.
What each SDK gives your code
- TypeScript: the SDK rejects the
for awaitloop overquery()with a plainError, so wrap the loop intry/catchand match on the message. A process killed by a signal reportsClaude Code process terminated by signal <name>in the same form. - Python: a bare exit raises
ProcessErrorwithCommand failed with exit code N; theError outputline is fixed text, and the exception'sexit_codeattribute carries the code. When the CLI reported an error result first, the SDK raisesResultErrorinstead, which subclassesProcessError.
How do I know it is fixed?
- The log entry that ended the process no longer appears, and a turn completes.
- Running
claudein a terminal in that project starts normally. - In the SDK, your
stderrcallback is quiet on a normal run, and the message loop finishes instead of rejecting.
Where these answers come from
- The message, the wrapper-and-IDE framing, the Windows 4294967295 behaviour, the v2.1.273 change, and the output-logs and terminal steps: Anthropic's error reference, Claude Code process exited with code N, read November 21, 2026.
- What the TypeScript and Python SDKs receive, the signal form, and the
stderrcallback: Anthropic's Agent SDK troubleshooting page, CLI process exit, read November 21, 2026. claude doctor: Anthropic's troubleshooting page, read November 21, 2026.
Common questions
What does Claude Code process exited with code 1 mean?
The claude process the wrapper launched exited with a non-zero code. The code alone does not say what failed; the real error is in the process's own output, which the wrapper appends when it captured any and otherwise keeps in its logs.
Where do I find the real error?
In VS Code, click View output logs under the conversation, or run Claude Code: Show Logs from the Command Palette. In an Agent SDK application, log the stderr callback your query options accept.
What is exit code 4294967295 on Windows?
Anthropic documents that the native Windows build can exit with code 4294967295 right after a turn completes. At a turn boundary with nothing pending, the VS Code extension closes the session quietly instead of showing the error, and your next message resumes the conversation. Before v2.1.273 it showed the error at every turn boundary.
What error does the TypeScript SDK throw?
It rejects the for await loop over query() with a plain Error rather than an SDK error class, so wrap the loop in try/catch and match the message. The text is Claude Code process exited with code N. stderr: <tail>.
Which error does the Python SDK raise?
A bare exit raises ProcessError; when the CLI reported an error result first, the SDK raises ResultError, which subclasses it and carries the CLI's own report. The section above shows the exact messages.