Wrapper and IDE errors
These errors come from the program that launched Claude Code for you, such as an IDE extension or an Agent SDK application, rather than from Claude Code itself.
Claude Code process exited with code N
The underlying claude process exited with a non-zero code. The exit code alone doesn't 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.
text
Error: Claude Code process exited with code 1What to do:
- In VS Code, follow the View output logs link shown with the error to see the underlying failure
- In an Agent SDK application, catch the error around your message loop. The entries under CLI process exit cover what your code receives in each SDK language.
- Run
claudein a terminal in the same project. The failure usually reproduces there with its real error message, which you can then look up on this page. - Run
claude doctorin a terminal to check the installation and configuration
Could not locate the Claude CLI on PATH
The VS Code extension shows this error on Windows when you open Claude Code in the integrated terminal, the terminal's shell is PowerShell, and the extension can't find the installed claude executable on PATH. The extension refuses to launch Claude Code until it finds the installed claude on PATH.
text
Failed to run Claude Code: Error: Could not locate the Claude CLI on PATH. Launching by name in a PowerShell terminal would run a 'claude' from the open folder instead of the installed CLI, so the launch was blocked. Make sure the Claude CLI's install directory is on your system PATH (not only your PowerShell profile), then restart VS Code and try again. VS Code reads PATH when it starts, so PATH changes take effect only after a restart.What to do:
- Open a new PowerShell window outside VS Code and run
where.exe claude. If it doesn't print a path, the CLI isn't on your PATH: add its install directory by following Verify your PATH. If it prints a path, the entry comes from your PowerShell profile or from a PATH change VS Code hasn't picked up yet; the next two steps cover those cases. - Set the PATH entry as a user or system environment variable, not in your PowerShell profile. The extension doesn't run your profile, so a PATH edit that lives only there never reaches it.
- Restart VS Code after changing PATH. The extension checks the PATH that VS Code captured at startup, so a PATH change takes effect only after a restart.