GrepBoard/Manuals
605 manuals ·

Fix "Claude Code process exited with code 1" in VS Code

·Tested on Claude Code official docs · 2026-10·Test scope ↓·6 steps

"Claude Code process exited with code 1" in VS Code hides the real cause. Find the actual error with Show Logs and by running claude in a terminal.

text
Error: Claude Code process exited with code 1

The claude process that the VS Code extension launched exited with a non-zero code. The official errors page says the exit code alone does not tell you what failed; the real error is in the process's own output. Your job is to find that output and look up the message it contains.

Public issues show how different the causes behind this one line are: a report where it appeared as soon as the panel opened after an extension update, with input stuck on "Forging..." (Windows); one that started with extension 2.0.0 and went away after downgrading to 1.0.127 (Windows 11); and one where the session ended the moment a follow-up message was sent (2.1.71). All three closed without an official root-cause answer. Finding the message with the steps below is faster than guessing.

[1] Click the View output logs link next to the error. The docs say the extension appends the process output to the error when it captured any, and otherwise keeps it in its logs. If there is no link, run Claude Code: Show Logs from the Command Palette (Ctrl+Shift+P) to open the Claude VSCode output channel. Read the lines just above exited with code 1.

[2] Run claude in a terminal in the same project folder. Per the docs, the failure usually reproduces there with its real error message.

console
$ cd /path/to/project$ claude

If you see something like Not logged in, Invalid API key or a settings file error, act on that message. Common ones are collected in Fix common Claude Code errors by message. If the terminal works fine, suspect a difference in how the extension and the CLI run (PATH, environment variables, working folder).

[3] Check the installation.

console
$ claude doctor

The docs recommend this command to check installation and configuration. If it warns about anything, fix that first.

[4] Check how the extension launches the CLI. The claudeProcessWrapper extension setting is the executable used to launch the Claude process. The docs say to point it at a separately installed claude binary if the extension build has none for your platform. If you set it in the past, confirm the path still exists and runs when you call it directly from a terminal.

If Could not locate the Claude CLI on PATH shows up with a PowerShell integrated terminal on Windows, that is a different problem. Add the CLI's install folder to the user or system PATH (not only your PowerShell profile) and restart VS Code, which reads PATH only at startup.

[5] Work around it if you need to keep going.

  • Run Developer: Reload Window and send the message again.
  • Turn on Use Terminal (claudeCode.useTerminal) in the extension settings to open Claude in terminal mode instead of the graphical panel, sidestepping panel-side problems.
  • If it started right after a specific update, you can install an earlier extension version (Install Specific Version in the Extensions view), but you will miss fixes in newer versions, so use it only until you find the cause.

[6] Tell apart the large exit code on Windows. Per the docs, the Windows native build can exit with 4294967295 right after a turn completes; since v2.1.273 the extension closes the session quietly instead of showing an error when no message or background task is waiting. Your next message resumes the conversation and nothing is lost. If you see the error at every turn boundary, update the extension to v2.1.273 or later.

The similar The connection to Claude Code ended before this message completed means the extension cannot tell whether your message was processed, so send it again. If it repeats, go back to step 2.

#claude-code#vscode#troubleshooting