Claude Code errors: what each one means and how to fix it

Find the message on your screen, see what caused it, and run the fix, with a quick way to tell a broken setup from an Anthropic outage.

Last updated

Abstract illustration of a glowing warning sign over a grid of terminal lines

Most Claude Code errors fall into two groups. A 500, a 529 "overloaded" or a "server is temporarily limiting requests" message comes from Anthropic's side: wait a minute, check whether Claude Code is down, and try again. Almost everything else (401, invalid API key, credit balance too low, command not found, login loops) is something on your machine, and the fix is usually one command.

Find your message in the table below and jump to its section. Each section gives the exact message, what it means, the fix, and how to tell whether it's you or an outage. Every message and fix here comes from Anthropic's Claude Code error reference and troubleshooting pages, the Claude Code changelog, or a linked GitHub issue, checked on November 30, 2026 against Claude Code 2.1.332. Claude Code changes almost weekly, so if your wording differs a little, the official error reference wins.

Quick lookup: Claude Code error messages

Error text you see Cause in five words Jump to
API Error: 500 Internal server error Unexpected failure inside the API 500
API Error: Repeated 529 Overloaded errors API at capacity for everyone 529
API Error: 401 Invalid authentication credentials Credential revoked or account disabled 401
Invalid API key · Fix external API key API key rejected or malformed Invalid API key
API Error: 403 Request not allowed Subscription, role or proxy problem 403
API Error: Request rejected (429) Your key's rate limit hit 429
You've hit your session limit Plan usage allowance used up Usage limit
Credit balance is too low Console credits empty, or stray key Credit balance
Prompt is too long / Context limit reached Conversation overflows the context window Prompt too long
Request timed out API missed the connection deadline Timeout
Unable to connect to API, Connection dropped (ECONNRESET) Network, VPN, proxy or DNS Connection
SSL certificate verification failed Proxy intercepting TLS traffic SSL
zsh: command not found: claude Install folder not on PATH Command not found
EACCES, permission denied on install Install directory not writable Permission denied
OAuth error: timeout of 15000ms exceeded Login service slow or down OAuth timeout
Not logged in · Please run /login No valid saved login Login loop
✘ Failed to connect in claude mcp list MCP server didn't start MCP
bwrap: setting up uid map: Permission denied AppArmor blocks the Linux sandbox Sandbox
API Error: 400 ... tool_use ids were found without tool_result blocks Conversation history out of sync Tool use 400
Auto-update failed · Run claude doctor Background update didn't install Auto-update
Error: Claude Code process exited with code 1 Real error hidden by wrapper Exit code 1
Error editing file Edit tool call was refused Error editing file

First, is it you or is it Anthropic?

Before you change anything, spend 30 seconds on this. Claude Code already retries temporary failures (server errors, overloaded responses, timeouts, dropped connections) up to 10 times with exponential backoff before it shows you an error, so by the time you see one, retrying instantly rarely helps.

  1. Check the live status: Claude Code status and Anthropic API status, or Anthropic's own page at status.claude.com. If there's an incident, wait it out.
  2. Inside Claude Code, run /status. It shows your version, model, account and which credential is active. A surprising number of errors come from Claude Code using an old API key instead of your subscription.
  3. From your shell, test whether you can reach the API at all:
curl -I https://api.anthropic.com
  1. Run a health check of the install and settings:
claude doctor

If curl fails, the problem is your network. If curl works, status is green and the error repeats, it's your setup. If status shows an incident, it isn't you.

Claude Code API error 500: internal server error

API Error: 500 Internal server error. This is a server-side issue, usually temporary

The message then points you to status.claude.com (or to your cloud provider's or gateway's status page if you use Amazon Bedrock, Google Cloud, Microsoft Foundry or a custom ANTHROPIC_BASE_URL). Anthropic's docs say a 5xx from the API "indicates an unexpected failure inside the API. It is not caused by your prompt, settings, or account."

Fix:

  1. Check Anthropic API status for an active incident.
  2. Wait a minute and send the message again. Your prompt is still in the conversation, so you can type try again instead of pasting it.
  3. If you set ANTHROPIC_BASE_URL to an LLM gateway and every request fails this way, check that the gateway accepts Claude Code's tool search fields (defer_loading and tool_reference); since v2.1.304 Claude Code sends them through gateways by default.
  4. If it keeps happening with no incident posted, run /feedback inside Claude Code so Anthropic can look at your request.

You or an outage? Almost always an outage. Waves of 500s are reported in GitHub issues such as #28614 (February 2026), where a Claude Max user reported every prompt failing with a 500. The only common setup cause is a gateway or proxy: an HTML error page from a proxy shows up as something like API Error: 502 Bad Gateway.

Claude Code API error 529: overloaded

API Error: Repeated 529 Overloaded errors. The API is at capacity

The API is temporarily out of capacity across all users, and Claude Code has already retried several times. Anthropic is explicit that "a 529 is not your usage limit and doesn't count against your quota."

Fix:

  1. Check Claude Code status for capacity notices.
  2. Try again in a few minutes.
  3. Switch models to keep working, because capacity is tracked per model:
/model

Claude Code sometimes suggests this itself, with a message like Opus is experiencing high load, please use /model to switch to Sonnet.

You or an outage? Always Anthropic's side. Nothing in your setup causes a 529.

Claude Code API error 401: invalid authentication credentials

Please run /login · API Error: 401 Invalid authentication credentials

The API understood your credential but rejected the account or organization behind it: the credential was revoked, your organization removed your access, or the account was deactivated. It isn't an expired token; that one reads API Error: 401 OAuth token has expired (or OAuth token revoked · Please run /login) and the fix is simply /login.

Fix:

  1. Run /status and see which credential is active.
  2. If it shows an API key row that isn't marked as not in use, an ANTHROPIC_API_KEY is taking precedence over your login, and /login won't replace it. Remove it from the shell:
unset ANTHROPIC_API_KEY

(In PowerShell: Remove-Item Env:ANTHROPIC_API_KEY.) Also delete the export ANTHROPIC_API_KEY=... line from ~/.zshrc, ~/.bashrc or ~/.profile, or rotate the key in the Claude Console.

  1. If /status shows only your login, run /login once.
  2. If the same error comes back for the same account, ask your organization admin to restore access.
  3. If ANTHROPIC_BASE_URL points at a gateway, the text after 401 is your gateway's message, not Anthropic's. Fix the credential the gateway expects.

You or an outage? Your setup. A 401 is about who you are, not about Anthropic's servers.

Claude Code invalid API key

Invalid API key · Fix external API key

The key in ANTHROPIC_API_KEY (or from your apiKeyHelper script) was rejected by the API, or Claude Code blocked it before sending because it contains a character a header can't carry, such as a line break. In that case the message continues with something like it contains a line break at character 41.

Fix:

  1. Check the key for typos and confirm it hasn't been revoked at platform.claude.com/settings/keys.
  2. See where the key is coming from. Tools like direnv and IDE terminals can load a stale key from a .env file without you noticing:
env | grep ANTHROPIC
  1. If you meant to use your Pro, Max or Ultra subscription, unset the key and log in:
unset ANTHROPIC_API_KEY
claude

Then run /login and check /status.

A related one: Your ANTHROPIC_API_KEY belongs to a disabled organization (older versions showed API Error: 400 ... This organization has been disabled.) while you have an active subscription means the same thing, an old key (often from a previous employer or project) overriding your login. Same fix. Our Claude Code pricing page explains why a stray key can also bill the wrong account.

You or an outage? Your setup.

Claude Code API error 403: request not allowed

API Error: 403 Request not allowed

You're signed in, but the account isn't allowed to make the request.

Fix:

  1. On Pro, Max or Ultra: check that your subscription is active at claude.ai/settings.
  2. On a Claude Console account: your account needs the "Claude Code" or "Developer" role. An admin assigns it at platform.claude.com/settings/members.
  3. Behind a corporate proxy: the proxy may be interfering with API requests; see Anthropic's network configuration page.
  4. If the browser sign-in page shows Claude Code access has not been granted for this account. Contact your administrator., your Enterprise organization's custom role doesn't include Claude Code. Only an owner of the organization can change that; then run claude and log in again.

You or an outage? Your account or network. If it started suddenly on an account that worked yesterday, check Claude Code status before you change anything.

Claude Code API error 429: rate limit reached

API Error: Request rejected (429) · this may be a temporary capacity issue. If it persists, check https://status.claude.com.

You've hit the rate limit set for your API key, Amazon Bedrock project or Google Cloud project. Older versions and the VS Code extension sometimes showed API Error: Rate limit reached instead; the changelog for v2.1.78 and v2.1.89 records fixes for cases where that message appeared for the wrong reason.

Fix:

  1. Run /status and confirm the active credential is the one you expect. A stray ANTHROPIC_API_KEY can route requests through a low-tier key instead of your subscription.
  2. Check your provider console for the limits on that key, and request a higher tier if you need it.
  3. Reduce concurrency: fewer parallel subagents, or a smaller model via /model for high-volume scripted runs.

There's a second, different message: API Error: Server is temporarily limiting requests (not your usage limit). That's a short throttle on Anthropic's side; Claude Code retries it automatically since v2.1.199. Wait briefly and try again.

You or an outage? "Request rejected (429)" is your key's limit. "Server is temporarily limiting requests" is Anthropic's side, so check Anthropic API status if it persists.

Claude Code usage limit reached: you've hit your session limit

You've hit your session limit · resets 3:45pm
You've hit your weekly limit · resets Mon 12:00am
You've hit your Opus limit · resets 3:45pm

Your Claude plan's usage allowance ran out. Claude Code blocks requests until the reset time in the message. The session and weekly limits are shared across all models, so switching models doesn't help; the Opus and Sonnet limits apply only to that model family.

Fix:

  1. Wait for the reset time shown. In an interactive session, Claude Code can wait and continue the task after the reset by itself.
  2. See your limits and reset times:
/usage
  1. For an Opus or Sonnet limit, run /model and pick a model outside that family.
  2. To keep going now, buy additional usage on Pro, Max or Ultra (or request it from your admin on Team and Enterprise):
/usage-credits
  1. Or move to a bigger plan. What each plan gives you is on our Claude Code pricing and Claude Pro vs Max pages.

You or an outage? Neither: it's your plan's quota. Claude Code warns you before it happens with a line like You've used 85% of your session limit.

Claude Code credit balance is too low

Credit balance is too low
Credit balance too low · Add funds: https://platform.claude.com/settings/billing

Either your Claude Console organization is out of prepaid credits, or Claude Code is sending requests with a Console API key when you meant to use your subscription. The second case is the one that confuses people: you pay for Max, and Claude Code complains about credits.

Fix:

  1. If you have a Pro, Max, Ultra, Team or Enterprise plan, run /status and look at the API key row. If a key is active, unset it, remove it from your shell profile, and relaunch:
unset ANTHROPIC_API_KEY
claude

Run /login if you haven't signed in with your subscription yet.

  1. If you do mean to pay per token, add credits at platform.claude.com/settings/billing, and consider turning on auto-reload there.
  2. Set per-workspace spend caps in the Console so one project can't drain the whole balance.

You or an outage? Your account. It's never an outage.

Claude Code prompt is too long: context limit reached

Prompt is too long

In an interactive session you usually see it as:

Context limit reached · /compact or /clear to continue

The conversation plus attached files no longer fits in the model's context window. On Amazon Bedrock the same condition reads Input is too long for requested model.

Fix:

  1. Summarize the conversation to free space, or start fresh:
/compact
/clear

If /compact answers Not enough messages to compact., one huge prompt or attachment is taking the space: /clear and resend with less pasted text.

  1. See what's filling the window (system prompt, tools, memory files, messages):
/context
  1. Turn off MCP servers you aren't using, since their tool definitions take space: /mcp disable <name>.
  2. Trim a long CLAUDE.md.
  3. If you turned auto-compact off in /config, turn it back on. It normally prevents this error.

A cousin of this error is Autocompact is thrashing: the context refilled to the limit.... Compaction worked, but a big file or tool output filled the window again straight away. Ask Claude to read the file in smaller pieces, or run /compact with a focus such as /compact keep only the plan and the diff. Our guide on how to use Claude Code covers the habits that keep sessions small.

You or an outage? Your session. It's about how much is in the conversation.

Claude Code request timed out

Request timed out

The API didn't respond before the connection deadline. The default request timeout is 10 minutes. If the message instead says Request timed out. Check your internet connection and proxy settings, it's a network problem; see the connection section.

Fix:

  1. Retry the request.
  2. If the message continues past Request timed out and names an environment variable, do what it says.
  3. Check your version. If you set API_TIMEOUT_MS to 0 and every request times out, versions before v2.1.305 had a problem with that; update or set a positive value:
claude --version
claude update
  1. On a slow network or proxy with a version before v2.1.328, raise API_TIMEOUT_MS, or update to v2.1.328 or later.

You or an outage? Either. If Claude Code status is green and other sites are slow, it's your network. If status shows elevated latency, it's Anthropic.

Claude Code unable to connect to API: ECONNRESET and connection errors

Unable to connect to API. Check your internet connection
Connection dropped (ECONNRESET)

The TCP connection to the API failed or never completed. Other forms name the cause and keep the code in parentheses, such as ENOTFOUND (DNS), EHOSTUNREACH (no route, often a VPN), ConnectionRefused or ERR_PROXY_TUNNEL. On first run you may see Unable to connect to Anthropic services instead. Versions before v2.1.227 printed every one of these as Unable to connect to API (CODE).

Fix:

  1. Test the API host from the same shell (on Windows PowerShell, use curl.exe instead of curl):
curl -I https://api.anthropic.com
  1. Behind a corporate proxy, set HTTPS_PROXY before launching claude.
  2. If curl works but Claude Code doesn't, look for a leftover gateway address. When ANTHROPIC_BASE_URL is set, Claude Code sends requests there instead of to Anthropic, so an old local proxy that's no longer running gives Connection refused:
echo $ANTHROPIC_BASE_URL

Remove it from your shell profile and from the env block of your settings files, then open a new terminal.

  1. On Linux and WSL, check /etc/resolv.conf for an unreachable nameserver. On macOS, a removed VPN can leave a stale utun interface behind (check ifconfig). Docker Desktop can also intercept traffic: quit it and retry.
  2. If you see Socket is closed (common behind Windows corporate proxies), update with claude update; it's retried automatically since v2.1.214.

You or an outage? Usually your network. If curl -I https://api.anthropic.com fails, it's definitely local. If curl works and Anthropic API status shows an incident, it's them.

Claude Code SSL certificate error

Unable to connect to API: SSL certificate verification failed (UNABLE_TO_GET_ISSUER_CERT_LOCALLY).
Unable to connect to API: Self-signed certificate detected (SELF_SIGNED_CERT_IN_CHAIN).

A proxy or security appliance on your network is intercepting TLS traffic with its own certificate, and Claude Code doesn't trust it. During /login the same problem reads SSL certificate error (UNABLE_TO_GET_ISSUER_CERT_LOCALLY). Older versions (before v2.1.273) ended with Check your proxy or corporate SSL certificates.

Fix:

  1. Get your organization's CA bundle from IT.
  2. Point Claude Code at it:
export NODE_EXTRA_CA_CERTS=/path/to/ca-bundle.pem
claude
  1. Don't set NODE_TLS_REJECT_UNAUTHORIZED=0. Anthropic's docs say it "disables certificate validation entirely."

You or an outage? Your network, every time. Claude Code doesn't retry this error, so it shows up on the first attempt.

claude: command not found

zsh: command not found: claude

The exact wording depends on your system:

System Message
macOS zsh: command not found: claude
Linux bash: claude: command not found
Windows CMD 'claude' is not recognized as an internal or external command
PowerShell claude : The term 'claude' is not recognized as the name of a cmdlet

The install finished, but the folder it installed into isn't on your PATH. The native installer puts claude in ~/.local/bin/claude on macOS and Linux, and %USERPROFILE%\.local\bin\claude.exe on Windows. It reports this as Native installation exists but ~/.local/bin is not in your PATH. under Setup notes:.

Fix (macOS and Linux):

  1. Check the program is there:
ls -la ~/.local/bin/claude

If it says No such file or directory, it was never installed; install it (the commands are in how to use Claude Code).

  1. Add the folder to your PATH. For Zsh, the macOS default:
echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.zshrc
source ~/.zshrc

For Bash on Linux, use ~/.bashrc instead of ~/.zshrc. For Bash on macOS, use ~/.bash_profile.

  1. Check it worked:
claude --version

Still not found? A terminal that was already open (or one inside your editor) keeps its old PATH: open a new window or restart the editor. Run echo $0 to confirm which shell you're actually using.

On Windows, open a new PowerShell window and run where.exe claude; if it prints nothing, add the install folder to your user PATH environment variable (not just your PowerShell profile), then restart the terminal or VS Code. If the error started right after an update on Windows, Anthropic's troubleshooting page has a section on restoring claude.exe from its backup.

You or an outage? Your install.

Claude Code permission denied (EACCES) during install

EACCES

The installer couldn't write to one of its folders, and the error names the path. On macOS and Linux it writes to ~/.local/bin/, ~/.local/share/claude/, ~/.local/state/claude/, ~/.cache/claude/, ~/.claude/downloads/ and ~/.claude.json.

Fix:

  1. Check whether the folders are writable:
test -w ~/.local/bin && echo "writable" || echo "not writable"
test -w ~/.claude && echo "writable" || echo "not writable"
  1. If not, create the folder and make yourself the owner:
sudo mkdir -p ~/.local/bin
sudo chown -R $(whoami) ~/.local
  1. If you installed with npm and hit npm permission errors, switch to the native installer rather than using sudo:
curl -fsSL https://claude.ai/install.sh | bash

Never run sudo npm install -g. Claude Code updates itself without sudo, so an install that needed sudo can't update automatically. If adding the PATH line itself prints zsh: permission denied: /Users/you/.zshrc, check the file's owner with ls -l ~/.zshrc and fix it with sudo chown $(whoami) ~/.zshrc (owned by someone else) or chmod u+w ~/.zshrc (read-only).

You or an outage? Your machine.

Claude Code OAuth error: timeout of 15000ms exceeded

OAuth error: timeout of 15000ms exceeded

This one isn't in Anthropic's error reference. It appears during /login, after you sign in in the browser and Claude Code waits for Anthropic's login service to confirm. GitHub issues #33213 and #33238 (March 11, 2026) and #44257 (April 6, 2026) show it hitting many users on macOS, Linux and Windows. A commenter on #44257 links it to a partial outage on status.claude.com, and a repository contributor closed that issue on November 28, 2026, saying it "was a temporary service issue that has since been resolved." Issues #33213 and #33238 are still open. A commenter on #33213 saw OAuth error: Request failed with status code 500 while trying an older version (v2.1.58).

Fix:

  1. Check Claude Code status. If login is degraded, wait; nothing on your side fixes it.
  2. Once status is green, do a clean re-login: run /logout, close Claude Code, start claude again and sign in.
  3. If the browser part works but returning to the terminal fails (common in SSH, WSL2 or containers), use the copy-paste flow: press c at the login prompt to copy the URL, open it in your local browser, and paste the code it shows. Or use:
claude auth login

Related login messages from Anthropic's troubleshooting page: OAuth error: Invalid code. Please make sure the full code was copied means the code expired or got cut off (sign in again quickly), and That doesn't look like the full code means you missed part of it, including the # in the middle.

You or an outage? The reports and the closing note on #44257 point to Anthropic's login service, though that is not stated in Anthropic's docs for every case. The fixes users posted in those threads (editing the installed JavaScript, downgrading) aren't official; we've left them out.

Claude Code login loop: not logged in, please run /login

Not logged in · Please run /login
Login expired · Please run /login

No valid saved login is available, or Claude Code tried to renew it and the renewal was rejected, so it cleared the saved credentials.

Fix:

  1. Run /login.
  2. If you're asked to log in again and again, check that your system clock is correct. Token validation depends on accurate time.
  3. On macOS, Claude Code saves your login in the Keychain. If the Keychain is locked or out of sync (common over SSH), run claude doctor and look for macOS Keychain is not writable. To unlock it:
security unlock-keychain ~/Library/Keychains/login.keychain-db

Then run /logout and /login. Logging out also clears saved MCP logins, so expect to sign in to those again.

  1. For scripts and CI, where an interactive login isn't possible, use ANTHROPIC_API_KEY or a long-lived token from claude setup-token.

You or an outage? Usually local (clock, Keychain, or several sessions fighting over one login on old versions). If many people report it at once, check Claude Code status.

Claude Code MCP server failed to connect

✘ Failed to connect

That's the status claude mcp list shows next to a server Claude Code couldn't connect to. The failure detail (HTTP status or error code) is appended to that line, and claude mcp get <name> shows it on an Issue: line. In a session, /mcp shows the server as failed. Claude Code itself is fine; one server isn't.

Fix:

  1. See the status and the reason:
claude mcp list
claude mcp get <name>
  1. Check for relative paths in the server's command or args. They resolve against the folder you launched Claude Code from, not the location of .mcp.json. Use absolute paths.
  2. A project server in .mcp.json needs a one-time approval. If you dismissed it, reset and restart Claude Code:
claude mcp reset-project-choices
  1. Make sure .mcp.json sits at the repository root (not inside .claude/) with servers under mcpServers. Claude Code doesn't read an mcpServers key from settings.json.
  2. Slow-starting server? Raise the startup timeout, for example MCP_TIMEOUT=10000 claude for 10 seconds.
  3. Still stuck: select Reconnect in /mcp, or run claude --debug=mcp and read the server's errors in the debug log.

New to MCP? What is MCP explains how servers plug into Claude Code.

You or an outage? Your configuration or the MCP server's own service, not Claude Code. If the server is a hosted one, check that vendor's status page.

Claude Code sandbox error: bwrap permission denied

bwrap: setting up uid map: Permission denied

On Linux and WSL2, Claude Code's sandbox uses bubblewrap (bwrap). This error, or bwrap: loopback: Failed RTM_NEWADDR: Operation not permitted, can mean Ubuntu's AppArmor restriction on user namespaces is blocking it.

Fix:

  1. Check whether the restriction is on:
sysctl kernel.apparmor_restrict_unprivileged_userns
  1. If it prints = 1, either add an AppArmor profile for bubblewrap (the steps are in Anthropic's sandboxing docs), or lift the restriction until the next reboot (this affects every program, not just Claude Code):
sudo sysctl -w kernel.apparmor_restrict_unprivileged_userns=0
  1. Restart Claude Code. Any other output means AppArmor isn't the cause; report it with /feedback.

If your admin requires the sandbox, a sandbox failure shows up as Sandbox is required but failed to initialize: <reason>, and each sandboxed command is refused until you fix what the reason names and restart.

You or an outage? Your machine's security settings.

Claude Code API error 400: tool_use ids were found without tool_result blocks

API Error: 400 due to tool use concurrency issues. Run /rewind to recover the conversation.
API Error: 400 orphaned tool_result in conversation history. Run /rewind to recover the conversation.
API Error: 400 duplicate tool_use ID in conversation history. Run /rewind to recover the conversation.

The conversation history reached the API in an inconsistent state: the sequence of tool calls, tool results and thinking blocks no longer matches what the API expects. Older forms of the same problem read tool_use ids were found without tool_result blocks and unexpected tool_use_id found in tool_result blocks; the changelog records fixes for both, for example when resuming or branching old sessions (v2.1.86 and v2.1.122).

Fix:

  1. Update first. Anthropic notes that on Opus 4.7 or Opus 4.8, versions before v2.1.156 could trigger this during normal tool use, and /rewind didn't clear it:
claude update
  1. Step back to a checkpoint before the broken turn, with /rewind or by pressing Esc twice, and continue from there.

You or an outage? A bug in that conversation's history, not an outage. Updating and rewinding fixes it; a fresh session (/clear) always works too.

Claude Code auto-update failed

Auto-update failed · Run claude doctor

This red line in the session footer means Claude Code tried to update itself in the background and the update didn't install. You can keep working; your current version still runs.

Fix:

  1. Run the update by hand to see the real reason (claude doctor only shows Last update attempt: failed (install_failed) with a date):
claude update
  1. If it fails with The connection dropped while downloading the update, run it again; behind a proxy, set HTTPS_PROXY first, and ask your network team to allow downloads from downloads.claude.ai.
  2. If it fails with Release verification failed for Claude Code <version>, nothing was installed. Run the same command again later.
  3. Homebrew, WinGet and Linux package manager installs don't auto-update by default: update with brew upgrade claude-code, winget upgrade Anthropic.ClaudeCode or your normal apt, dnf or apk upgrade. For npm, use npm install -g @anthropic-ai/claude-code@latest.

If updates keep landing with regressions, set autoUpdatesChannel to "stable" in your settings (or change the channel in /config) to get a version that is typically about a week old.

You or an outage? Usually your network or proxy cutting off a large download.

Error: Claude Code process exited with code 1

Error: Claude Code process exited with code 1

You see this in the VS Code extension, the desktop app or an Agent SDK program. The claude process underneath crashed, and the exit code alone doesn't say why. The real error is in that process's output. GitHub issue #51045, for example, traced one case in the desktop app to an SSL certificate trust failure.

Fix:

  1. In VS Code, click the View output logs link shown with the error.
  2. Run Claude Code in a terminal in the same project. The failure usually reproduces there with its real message, which you can then find on this page:
cd /path/to/your/project
claude
  1. Check the install and settings:
claude doctor

On Windows, the native build can exit with code 4294967295 right after a turn. Since v2.1.273 the VS Code extension closes the session quietly in that case, and your next message resumes the conversation.

You or an outage? Find the real error first. If it turns out to be a 500 or 529, it's Anthropic; anything else is local.

Claude Code error editing file

Error editing file

The conversation view shows this short line when one of Claude's file edits was refused. The full reason is in the transcript view. In the case Anthropic documents, you don't need to do anything: the reason goes back to Claude as a tool error, and Claude retries on its own.

Fix:

  1. Press Ctrl+O to open the transcript view and read the full message.
  2. If the message is File has not been read yet on a file Claude has already read, update Claude Code; the changelog records fixes for spurious cases of it (after resuming a session, and after compaction):
claude update
  1. If the same file keeps failing in a worktree session, the path may run through a symlink. Ask Claude to edit the target file by its real path.

You or an outage? Local. It's about the file, not the API.

When nothing on this page matches

Run /doctor inside Claude Code for an automatic check that can apply fixes, or claude doctor from your shell if claude won't start. Search the full error reference, which maps hundreds of messages to fixes, and the GitHub issues for your exact message. To report a bug from inside a session, use /feedback. For billing or account problems, contact Anthropic support from claude.ai (click your initials, then Get help).

Many "errors" that aren't errors (Claude going in circles, filling its context, editing the wrong files) get rarer in a codebase with clear conventions, a short CLAUDE.md and tests Claude can run. That's the idea behind RailsFast.

Frequently asked questions

How do I fix an API error in Claude Code?

Read the number after API Error:. A 500 or 529 is on Anthropic's side, so check the Claude Code status page, wait a minute and try again, or switch models with /model for a 529. A 401, 403, 429 or "credit balance too low" is usually your credential: run /status to see which one is active and unset any stray ANTHROPIC_API_KEY.

Is Claude Code down, or is it my setup?

Check the live Claude Code status and Anthropic API status pages first. Then run curl -I https://api.anthropic.com from your shell: if it fails, the problem is your network. If status is green, curl works and the error repeats, it's your setup, and claude doctor is the next step.

What does Claude Code API error 500 mean?

It means an unexpected failure inside Anthropic's API, and Anthropic says it is not caused by your prompt, settings or account. Claude Code has already retried before showing it. Wait a minute, check status, and send try again; if it persists with no incident posted, report it with /feedback.

Does a 529 overloaded error count against my usage limit?

No. Anthropic's error reference says a 529 is not your usage limit and doesn't count against your quota. It means the API is at capacity across all users, and since capacity is tracked per model, switching models with /model often lets you keep working.

Why does Claude Code say credit balance is too low when I pay for Max?

Because Claude Code is almost certainly using an API key instead of your subscription. An approved ANTHROPIC_API_KEY in your environment takes priority over your login and bills that key's Console account. Run /status, then unset ANTHROPIC_API_KEY, remove it from your shell profile, and start claude again.

How do I fix "claude: command not found" after installing?

The install folder isn't on your PATH. On macOS with Zsh, run echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.zshrc and then source ~/.zshrc, or open a new terminal. Check with claude --version; on Linux with Bash use ~/.bashrc instead.

What does "Claude Code process exited with code 1" mean?

It means the claude process behind the VS Code extension, the desktop app or an SDK program crashed, and the real error is hidden in its output. Open the extension's output logs, or run claude in a terminal in the same project to see the actual message. claude doctor checks the install at the same time.

How do I fix "Prompt is too long" in Claude Code?

Run /compact to summarize earlier turns, or /clear to start a new conversation. If it keeps happening, run /context to see what fills the window, disable unused MCP servers with /mcp disable <name>, and trim a long CLAUDE.md. Auto-compact is on by default and normally prevents this error, so turn it back on in /config if you switched it off.

Sources

All checked on November 30, 2026.

Checklist

Grab your free launch checklist 🚀

The definitive checklist to launch any project. It includes pre-launch steps & a detailed launch checklist you can go through to get your new project off the ground.

Secure connection. No spam.