Omniscio

OmniscioGuidesClaude Code error messages

Claude Code error messages explained

The messages Claude Code prints when something stops it, word for word, with what each means and how to clear it.

Last tested on Claude Code 2.1.309, October 23, 2026. By the Omniscio team. Updated .

Prompt is too long, or Context limit reached

Prompt is too long
Context limit reached · /compact or /clear to continue

What it means. The conversation plus its attached files no longer fits the model's context window. The second line is how an interactive session shows it.

How to fix it

  1. Run /compact to summarize earlier turns and free space, or /clear to start fresh.
  2. Run /context to see what is taking the space: the system prompt, tools, memory files and messages.
  3. Turn off MCP servers you are not using with /mcp disable <name>. Their tool definitions are sent with every request.
  4. Trim a large CLAUDE.md file.
  5. If you turned auto-compact off in /config or with DISABLE_AUTO_COMPACT, turn it back on. It is on by default and normally stops this error.

Not reproduced. The message and steps rest on Anthropic's error reference, read October 15, 2026.

Request too large (max 32MB)

Request too large (max 32MB). Accumulated images and attachments in the conversation pushed the request over the limit. Run /compact, or double press esc to go back and remove attachments.
Request too large (max 32MB; 20.1MB of about 33.4MB is images or documents).
Request too large for the API's 32MB request limit

What it means. The raw request body passed the API's 32MB limit before tokenization, usually from pasted content, tool results or attachments. That limit is separate from the context window, so a conversation well inside its context can still fail. When the message names a figure, Claude Code retries with the images and documents stripped.

How to fix it

  1. Run /compact. It drops accumulated images and attachments.
  2. If it says compacting cannot make it fit, the messages alone are over the limit. Press Esc twice to step back past the turn that added the content, or run /clear.
  3. Reference large files by path instead of pasting them, so Claude reads them in chunks.

Not reproduced: it needs about 32MB of attachments. Messages and steps from Anthropic's error reference, read October 18, 2026, including the measured forms and the notes on versions before 2.1.212 and 2.1.229.

Error during compaction: Conversation too long

Error: Error during compaction: Error: Conversation too long. Press esc twice to go up a few messages and try again.
Prompt is too long · automatic compaction failed: <the underlying error>

What it means. Claude Code tried to summarize the conversation to make room, and that step failed. The first line is the older wording; current versions print the second.

How to fix it

  1. If the message names an error after automatic compaction failed:, fix that error first, using its own section here. /compact fails on it until you do.
  2. On the older wording, do what it says: press Esc twice, then try again.
  3. If /compact answers Not enough messages to compact., one prompt is taking the space. Run /clear and resend it with less pasted text.
  4. Update with claude update. Before 2.1.269, compaction failed whenever it could not summarize a whole exchange.

Not reproduced. Older wording from GitHub issue #26518, current wording from Anthropic's error reference, both read October 15, 2026.

The other compaction messages, including the one that means compaction worked and the window refilled straight after it, are on the compaction errors guide.

API Error: 400 orphaned tool_result in conversation history

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.
API Error: 400 due to tool use concurrency issues. Run /rewind to recover the conversation.

What it means. The tool_use, tool_result and thinking blocks no longer line up the way the API requires. All three are the same problem, and each names the shape it found.

How to fix it

  1. On Opus 4.7 or Opus 4.8, run claude update first. Versions before 2.1.156 can produce this during normal tool use, and /rewind does not clear it.
  2. Run /rewind, or press Esc twice, to step back past the damaged turn.

Not reproduced: it needs a conversation whose tool calls and results no longer match. From Anthropic's error reference, read October 18, 2026. This message has its own page: API Error: 400 orphaned tool_result in conversation history.

API Error: 529 Overloaded, or 500 Internal server error

API Error: Repeated 529 Overloaded errors. The API is at capacity — this is usually temporary. Try again in a moment. If it persists, check https://status.claude.com.
API Error: 500 Internal server error. This is a server-side issue, usually temporary — try again in a moment. If it persists, check https://status.claude.com.
Opus is experiencing high load, please use /model to switch to Sonnet
Opus is experiencing high load. Switch to Sonnet.
API Error: 529 {"type":"error","error":{"type":"overloaded_error","message":"Overloaded.
https://docs.claude.com/en/api/errors"},"request_id":"req_011CZTEFvft13DajMTp9pp64"}

What it means. Both come from the service you are connected to: Anthropic on the Anthropic API, otherwise the service behind your Bedrock, Google Cloud, Foundry or gateway endpoint. A 529 means that service is at capacity for everyone; it is not your usage limit and does not count against your quota. A 500 means something failed inside it.

The Opus line is the same pressure on one model; the last line is a raw response reported from 2.1.85 in GitHub issue #39745.

How to fix it

  1. Check status.claude.com for an incident.
  2. Wait a few minutes and resend. After a 500 your message is still there, so type try again.
  3. For a 529, run /model and switch models to keep working. Capacity is tracked per model.
  4. If a 500 keeps happening and no incident is posted, run /feedback.

Not reproduced: a 529 needs the API at capacity for everyone. From Anthropic's error reference and Anthropic's API errors, read October 15 and 23, 2026.

A subagent stopped by one of these has its own page: Agent terminated early due to an API error: <error detail>.

API Error: 400 from the API or a gateway

What it means. The request reached the API and the API refused it, so this is not a connection problem. The message names what it refused: a request the model could not process, or a field it does not accept.

Each has its own page with the steps that clear it. A 400 that names a tool-use or thinking block instead is in the tool result section above.

You've hit your session limit, or 5-hour limit reached

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
You've hit your Sonnet limit · resets 3:45pm
5-hour limit reached ∙ resets 12pm

What it means. Your subscription's rolling allowance has run out, and Claude Code blocks requests until the time shown. The session and weekly lines cover every model; the Opus and Sonnet lines cover that family only.

How to fix it

  1. Wait for the reset time in the message.
  2. Run /usage to see your plan's limits and when each resets.
  3. On a claude.ai subscription, Claude Code can hold the session and resume after the reset. That is on by default from 2.1.234: Continue automatically at usage limit in /config, plus a checkbox on the desktop app's session-limit card.
  4. If the message names Opus or Sonnet, switch outside that family with /model. The session and weekly limits are shared, so switching does not help those.
  5. On Pro and Max, /usage-credits buys more usage. On Team and Enterprise it sends the request to your admin.

Not reproduced: the capture machine signs in with a key, so there was no allowance to run down. From Anthropic's error reference, read October 15, 2026, and GitHub issue #6457 for the older wording.

The 1M-context message is a different limit and has its own page: API Error: Usage credits required for 1M context · run /usage-credits to turn them on (they take effect after you restart Claude Code), or /model to switch to standard context.

You've hit your monthly spend limit

You've hit your monthly spend limit · raise it at https://claude.ai/settings/usage?from=cc_cli_limit_message
You've hit your org's monthly spend limit · visit https://claude.ai/admin-settings/usage to raise it
You've hit your individual spend limit · ask your admin for a higher limit
You've hit your team's shared budget · ask your admin to raise it at https://claude.ai/admin-settings/usage
You've hit your channel's monthly spend limit · an org owner or channel manager can raise it in the channel's Claude settings

What it means. Your plan's included usage cannot cover this request — either a usage window has run out, or the request is one only usage credits pay for — and the usage credits that would otherwise pay for it have hit a spend limit. The message says whose limit it is; on usage-billed organizations it says usage limit instead.

How to fix it

  1. On Pro and Max, raise it in Settings > Usage on claude.ai, or run /usage-credits.
  2. On Team and Enterprise, raise it in Organization settings > Usage if you manage billing. If not, /usage-credits sends the request to your admin.
  3. For a channel's limit, ask an org owner or that channel's manager to raise it.
  4. If the message also names a reset time, you can wait; /usage shows each window and when it resets.

Not reproduced: it needs an organization whose billing stopped accepting requests. From Anthropic's error reference, read October 15, 2026.

Credit balance is too low

Credit balance is too low

What it means. Your Console organization has run out of prepaid credits, or Claude Code is sending requests with a Console API key when you meant to use your subscription.

How to fix it

  1. On a Pro, Max, Team or Enterprise plan, run /status and read the API key row. An approved ANTHROPIC_API_KEY routes requests through that key, not your subscription. Remove it from your shell and profile, restart claude, and run /login.
  2. Add credits at platform.claude.com/settings/billing, and turn on auto-reload there.

Not reproduced: it needs a Console account with an empty balance. From Anthropic's error reference, read October 18, 2026.

API Error: Request rejected (429)

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

What it means. Your requests hit the rate limit set for your API key, Amazon Bedrock project or Google Cloud project.

How to fix it

  1. Run /status and confirm the active credential is the one you expect. A stray ANTHROPIC_API_KEY can send requests through a low-tier key instead of your subscription.
  2. Check your provider's console for the limits in force, and request a higher tier if you need one.
  3. Send fewer requests at once: run fewer subagents in parallel, or use a smaller model with /model.

The other 429 wording, the bare API Error: Rate limit reached, names neither the limit nor a reset time: the rate limit reached guide works out which limit stopped the request and what to do about it.

Not reproduced: reaching a 429 here would mean flooding a provider. From Anthropic's error reference and Anthropic's API errors, read October 15 and 23, 2026.

Unable to connect to API. Check your internet connection

Unable to connect to API. Check your internet connection
Connection refused — a firewall or proxy may be blocking it (ConnectionRefused)
Can't reach the API server — check your internet or DNS (ENOTFOUND)
No internet route — check your connection or VPN (EHOSTUNREACH)
Couldn't connect through your proxy (ERR_PROXY_TUNNEL) — the proxy refused the tunnel: check its credentials and that it allows this host
Connection dropped (ECONNRESET)

What it means. The connection failed or never completed, so the request never reached Anthropic. Recent versions name the failure and keep the code in parentheses.

How to fix it

  1. Open another website. If that fails too, the problem is your connection, not Claude Code.
  2. Run curl -I https://api.anthropic.com in the same shell. In PowerShell use curl.exe -I https://api.anthropic.com.
  3. Behind a corporate proxy, set HTTPS_PROXY before you start Claude Code.
  4. Run echo $ANTHROPIC_BASE_URL (or $env:ANTHROPIC_BASE_URL in PowerShell) and check your settings' env block. A leftover value pointing at a dead gateway gives Connection refused while curl still works.
  5. On Linux and WSL, check /etc/resolv.conf for a nameserver that no longer answers.
  6. On macOS, check ifconfig for a stale utun interface left by a removed VPN.
  7. Quit Docker Desktop and similar container runtimes and retry. They can intercept outbound traffic.
  8. Intermittent failures are retried automatically. One that keeps coming back points at the machine's own network setup.

Not reproduced: it needs a machine cut off from api.anthropic.com. From Anthropic's error reference, read October 18, 2026, including the note on versions before 2.1.227.

When the request does get an answer that is not an API message, that is a different failure with its own page: API returned an empty or malformed response (HTTP 200) — check for a proxy or gateway intercepting the request.

Three neighbours here have their own pages because each ends a turn differently. A request that connects but never gets response headers ends with No response from API. A stream that arrives carrying nothing usable ends with streaming response ended before any complete data was received. A stream cut off after part of the answer keeps what Claude wrote and appends the response above may be incomplete. And the check that runs before sign-in, rather than during a request, is Unable to connect to Anthropic services.

OAuth token has expired, or Not logged in

Please run /login · API Error: 401 OAuth token has expired ...
OAuth token revoked · Please run /login
Not logged in · Please run /login

What it means. Your saved login is no longer valid. Expired means the automatic refresh failed mid-session; revoked means you signed out everywhere or an admin removed your access.

How to fix it

  1. Run /login at the Claude Code prompt and sign in again.
  2. If a claude -p command or an Agent SDK program hit it, run claude in the same environment, complete /login, then rerun the command.
  3. For automation that cannot sign in by hand, use an ANTHROPIC_API_KEY or a long-lived token from claude setup-token.
  4. If it asks you to log in on every launch, work through the system clock and macOS credential checks in Anthropic's install troubleshooting.
$ claude -p "reply with the single word: ok"
Not logged in · Please run /login

Reproduced above: the home directory was empty, so there was no saved login. The expired and revoked halves rest on Anthropic's error reference, read October 15, 2026. Claude Code 2.1.309 on Linux x64, October 23, 2026.

One sign-in failure is not about the token at all: if the message says your account is on hold, the account on hold guide explains why signing in again cannot clear it and what does.

Stop watching terminals for errors

Omniscio runs your Claude Code sessions in one window. One that stops on an error is listed in its Interrupted section with the error's name, and one that asks you a question moves to your inbox.

For Windows, macOS and Linux.

Invalid API key

Invalid API key · Fix external API key
Invalid API key · Please run /login

What it means. The API rejected the key Claude Code sent from ANTHROPIC_API_KEY or an apiKeyHelper script. The second line is an older wording users reported.

How to fix it

  1. Check the key for typos, and confirm in the Claude Console that it has not been revoked.
  2. In the same shell, run env | grep ANTHROPIC, or Get-ChildItem Env:ANTHROPIC* in PowerShell. direnv, dotenv plugins and IDE terminals can load a stale key from a .env file.
  3. To use your subscription instead, unset ANTHROPIC_API_KEY and run /login.
  4. Run /status to confirm which credential is in use now.
$ ANTHROPIC_API_KEY=sk-ant-api03-not-a-real-key claude -p "reply with the single word: ok"
Invalid API key · Fix external API key

Reproduced above with a made-up key. Claude Code 2.1.309 on Linux x64, October 23, 2026. Sources: Anthropic's error reference, and GitHub issue #5167 for the older wording.

Claude requested permissions to use Bash, but you haven't granted it yet

Error: Claude requested permissions to use Bash, but you haven't granted it yet.

What it means. Claude tried to use a tool without approval: no allow rule covered the call, and the prompt that would have granted it went unanswered. The report behind this wording was a claude -p run with Bash(git commit:*) allowed.

How to fix it

  1. Run /permissions. It lists every rule and the settings file each one comes from.
  2. Remove or narrow the rule that blocks the tool. Rules are checked deny first, then ask, then allow, and the first match wins.
  3. For claude -p, allow the tool up front with --allowedTools: the whole tool ("Bash") or a pattern such as "Bash(git commit *)".
  4. If your organization's managed settings deny the tool, no other setting can allow it. Ask your admin.
$ claude -p "Run this exact shell command with the Bash tool: echo hello-from-bash" --output-format stream-json --verbose
{"type":"system","subtype":"permission_denied","tool_name":"Bash",
 "message":"Claude requested permissions to use Bash, but you haven't granted it yet.", ...}

Reproduced above: that is the event Claude Code emits when it turns the call down. We reached it with {"permissions":{"ask":["Bash"]}} in a project's .claude/settings.json, running where nothing could answer. Claude Code 2.1.309 on Linux x64, October 23, 2026. Sources: Anthropic, permissions, programmatic runs and GitHub issue #1520.

MCP server not connecting: Failed to connect, or Connection closed

✘ Failed to connect
MCP error -32000: Connection closed

What it means. Claude Code could not start or reach one of your MCP servers. claude mcp list prints the first line beside it.

How to fix it

  1. Run claude mcp get <name> and read its Issue: line, which carries the status code and any text the server sent.
  2. Open /mcp and choose Reconnect from that server's menu.
  3. If a project's .mcp.json server shows Pending approval, run claude in that folder and approve it.
  4. Give local scripts in command or args as absolute paths. A relative path is why a server starts in one directory and fails in another.
  5. If the server is slow to start, raise MCP_TIMEOUT from its default of 30000 milliseconds, for example MCP_TIMEOUT=60000 claude.
$ claude mcp list
Checking MCP server health…

demo-missing: definitely-not-a-real-binary-xyz  - ✘ Failed to connect — ENOENT: Executable not found in $PATH: "definitely-not-a-real-binary-xyz"
demo-quits: node /tmp/mcp-demo2/quits.mjs - ✘ Failed to connect — CONNECTION_CLOSED: Connection closed
demo-pending: definitely-not-a-real-binary-xyz  - Pending approval (run `claude` to approve)

Reproduced above: one project, three servers, the three states you can be in. demo-missing and demo-quits are user-scope servers broken on purpose; demo-pending is a project server nobody approved. Claude Code prints a small pause symbol before Pending approval; we left it out, and the rest of the line is as printed.

Claude Code 2.1.309, Linux x64, October 23, 2026.

Ask a failed server what went wrong:

$ claude mcp get demo-quits
demo-quits:
  Scope: User config (available in all your projects)
  Status: ✘ Failed to connect
  Issue: CONNECTION_CLOSED: Connection closed
  Type: stdio
  Command: node
  Args: /tmp/mcp-demo2/quits.mjs
  Environment:

To remove this server, run: claude mcp remove demo-quits -s user

An unapproved project server answers the same way and names its scope. The pause symbol is left off that Status: line as well:

$ claude mcp get demo-pending
demo-pending:
  Scope: Project config (shared via .mcp.json)
  Status: Pending approval (run `claude` to approve)
  Type: stdio
  Command: definitely-not-a-real-binary-xyz
  Args:

To remove this server, run: claude mcp remove demo-pending -s project

Sources: Anthropic's MCP docs and configuration debugging page; GitHub issue #90844 for the closed connection.

Auto mode is unavailable: the server returned no safety verdict

The server-side auto mode classifier gave no verdict (timed out), so auto mode cannot determine the safety of <tool>.
Auto mode is unavailable — the server returned no safety verdict for the last 10 responses, so Claude stopped. Send a message to try again, or switch out of auto mode.

What it means. In auto mode a separate classifier reviews each action before it runs. With no verdict, auto mode denies that action, and after ten in a row it stops the turn.

If your message is Auto mode is unavailable — the server returned no safety verdict, the dedicated page covers every classifier message.

How to fix it

  1. In an interactive session, press Ctrl+O to read the denial text in the transcript viewer.
  2. If it names (the conversation is too long for the check), run /compact; until the conversation is shorter, another message gets the same denial. If auto-compact is off, turn it back on.
  3. Send another message and the count starts over.
  4. If your requests go through a gateway or proxy and the stop repeats, check whether it cuts streaming responses short or rewrites them.
  5. Set CLAUDE_CODE_AUTO_MODE_SERVER=0 before you start Claude Code so it makes its own classifier requests. On a direct connection that needs 2.1.281 or later.
  6. To approve the actions yourself, switch out of auto mode.

Not reproduced: it needs Anthropic's classifier to stop answering. From Anthropic's error reference, with the classifier in permission modes, both read October 15, 2026.

command not found: claude

zsh: command not found: claude
bash: claude: command not found
'claude' is not recognized as an internal or external command

What it means. The install finished, but the folder it put claude in is not on your PATH. The installer uses ~/.local/bin on macOS and Linux and %USERPROFILE%\.local\bin on Windows.

How to fix it

  1. Check the program is there: ls -la ~/.local/bin/claude. If it is missing and you did not install another way, such as npm, Homebrew or a package manager, install again.
  2. On macOS with Zsh, run echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.zshrc then source ~/.zshrc. With Bash on Linux, use ~/.bashrc in both.
  3. On Windows, add the folder to your user PATH and open a new terminal.
  4. If claude now runs but misbehaves, run claude doctor for installation diagnostics.

Command not found: claude is the deep page: the PATH check for every shell, and the two documented cases that are not PATH at all.

$ env -i PATH=/usr/bin:/bin bash -c 'claude --version'
bash: line 1: claude: command not found

Reproduced above: Claude Code installed and working, run with a PATH that leaves out where it lives. The word before the colon is your shell; we used bash -c rather than a login shell, which re-reads the profile and can put /usr/local/bin back. Source: Anthropic, install troubleshooting.

No conversation found with session ID

No conversation found with session ID: <session-id>

What it means. You passed an ID to claude --resume and no saved transcript matched it. Claude Code searches the current project, then every other one, and exits with code 1.

How to fix it

  1. Open the picker with claude --resume, press Ctrl+A to widen it to every project, then pick the session.
  2. Check the ID against the session_id a --output-format json run printed. Sessions from claude -p or the Agent SDK never appear in the picker.
  3. If the work ran on another machine, resume it there. Transcripts are local, so the ID does not exist anywhere else.
  4. If the transcript is older than the 30-day retention, it is gone. Start a new session, or use claude --continue to carry on the project's most recent one.
  5. Run claude update. Before 2.1.223 the lookup stopped at the current directory and its worktrees.
$ claude --resume 00000000-0000-4000-8000-000000000000
No conversation found with session ID: 00000000-0000-4000-8000-000000000000

Reproduced above: it exited with code 1, from a throwaway home directory and project. Claude Code 2.1.309 on Linux x64, October 23, 2026. Sources: Anthropic's error reference, and claude --help.

If you saw Failed to load session in the desktop app rather than a terminal message, that is a different error: it comes from the app's Code tab, Anthropic documents three causes for it, and the picker will not clear it.

Two lines that are not Claude Code errors

People reach this page after pasting both.

Our servers are currently overloaded. Please try again later. is not a Claude Code message: it is not in Anthropic's error reference and no issue reports it. A gateway may have passed it on; the 529 section is Claude Code's own capacity message.

Neither is CCS couldn't find valid user data. Data could be missing, expired or invalid. It is not in Anthropic's reference, a search of GitHub issues and public code finds nothing, and ccs is not a Claude Code command, so check that program's documentation.

How we tested these

We re-ran all six captures on Claude Code 2.1.309, Linux x64, on October 23, 2026. Each opens with the command we ran; a ... marks a cut, and a capture that leaves anything else out says so beside it. All six came from a throwaway setup you can repeat.

Which guide owns your message?

Some families have a page of their own, and those pages go further than this one can. Start there when the line you have is one of these:

Anything not on that list is here or linked from the related guides section below, quoted with the step that clears it.

Running several sessions at once

The context errors above are easier to prevent than to clear, and with several sessions open it is hard to watch each one. Omniscio, the desktop app we make for running many Claude Code sessions, shows how full each session's context is and warns at 75% and 90%, and the Context warnings page covers both thresholds and how to switch them off. The features page lists the rest; the download page has the installers.

Sources

Every message, meaning and step rests on one of these; the date beside each is when it was read.

Anthropic's error reference moves with nearly every release and keeps notes such as “Before v2.1.269”.

Common questions

Does a 529 Overloaded error count against my usage limit?

No. Anthropic's error reference says a 529 is not your usage limit and does not count against your quota. It means the API is at capacity for everyone, so wait a few minutes or switch models with /model.

What is the difference between a usage limit and a 429?

A usage limit belongs to a Claude subscription and lifts at the reset time the message shows. A 429 is the rate limit on an API key or a cloud provider project, and you request a higher tier in that provider's console.

What does "Credit balance is too low" mean?

The Console organization has run out of prepaid credits, or Claude Code is sending requests with a Console API key when you meant to use your subscription. Run /status to see which credential is active, unset a stray ANTHROPIC_API_KEY if you meant to use the subscription, and add credits at platform.claude.com/settings/billing.

How do I see which login or API key Claude Code is using?

Run /status. It names the active credential. An approved ANTHROPIC_API_KEY in your environment takes precedence over your subscription login, which can explain a 401 or a 429 you did not expect.

Were these errors actually reproduced, or copied from the docs?

Six of the seventeen were raised on Claude Code 2.1.309 and their terminal captures are on this page: the not-logged-in message, the invalid key, the permission refusal, the MCP failures, the missing command and the missing session ID. Each case we could not raise has its own section saying so and stating what it rests on.

Where is the full list of Claude Code errors?

Anthropic keeps an error reference at code.claude.com/docs/en/errors and an install troubleshooting page beside it. This page covers seventeen common messages and links each one to its source.