OmniscioGuidesClaude Code error messages
Claude Code error messages explained
The messages Claude Code prints when something stops it, word for word, with what each one means and the steps that clear it. Every message and every fix comes from Anthropic's own documentation or from the GitHub issue where a user reported it, and each section links its source.
Messages checked against their sources on October 13, 2026. Updated .
Find your error
Search this page for a few words of the message you saw. Claude Code changes its wording between releases, so each section shows the current message and, where people still paste it, the older one.
- Prompt is too long, or Context limit reached
- Error during compaction: Conversation too long
- API Error: 529 Overloaded, or 500 Internal server error
- You've hit your session limit, or 5-hour limit reached
- You've hit your org's monthly spend limit
- API Error: Request rejected (429)
- OAuth token has expired, or Not logged in
- Invalid API key
- Claude requested permissions to use Bash, but you haven't granted it yet
- MCP server not connecting: Failed to connect, or Connection closed
- Auto mode is unavailable: no safety verdict
- command not found: claude
Prompt is too long, or Context limit reached
Prompt is too longContext limit reached · /compact or /clear to continueWhat it means. The conversation, plus the files attached to it, no longer fits in the model's context window. The second line is how an interactive session shows the same error.
How to fix it
- Run
/compactto summarize the earlier turns and free space, or/clearto start a fresh conversation. - Run
/contextto see what is taking the space: the system prompt, tools, memory files and messages. - Turn off MCP servers you are not using with
/mcp disable <name>. Their tool definitions are sent with every request. - Trim a large
CLAUDE.mdfile. - If you turned auto-compact off in
/configor withDISABLE_AUTO_COMPACT, turn it back on. It is on by default and normally stops this error from appearing.
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 the summary step failed. The first line is the older wording users reported; current versions print the second, which names what went wrong.
How to fix it
- If the message names an error after
automatic compaction failed:, fix that error first, using its own section on this page./compactfails on the same error until you do. - On the older wording, do what it says: press Esc twice to go back a few messages, then try again.
- If
/compactanswersNot enough messages to compact., the space is taken by a single prompt. Run/clearand send it again with less pasted text or smaller attachments. - Update with
claude update. Before version 2.1.269, compaction failed whenever it could not summarize a whole exchange.
Sources: Anthropic, Claude Code error reference; the older wording from GitHub issue #26518.
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.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 are on Anthropic's side. A 529 means the API is at capacity for all users; it is not your usage limit and does not count against your quota, and Claude Code has already retried several times before it shows the message. A 500 means something failed inside the API, and your prompt, settings and account did not cause it. The last line is the raw API response one user reported from Claude Code 2.1.85, in GitHub issue #39745.
How to fix it
- Check status.claude.com for an incident or a capacity notice.
- Wait a few minutes and send the message again. After a 500, your original message is still in the conversation, so you can type
try againinstead of pasting it. - For a 529, run
/modeland switch to another model to keep working now. Capacity is tracked per model. - If a 500 keeps happening and no incident is posted, run
/feedbackso Anthropic can look at your request.
Sources: Anthropic, Claude Code error reference (529) and (500); Anthropic API errors; the raw form from GitHub issue #39745.
You've hit your session limit, or 5-hour limit reached
You've hit your session limit · resets 3:45pmYou've hit your weekly limit · resets Mon 12:00am5-hour limit reached ∙ resets 12pmWhat it means. Your Claude subscription's rolling usage allowance has run out, and Claude Code blocks requests until the time shown. The last line is the older wording of the session limit.
How to fix it
- Wait for the reset time in the message.
- Run
/usageto see your plan's limits and when each one resets. - If the message names Opus or Sonnet, switch to a model outside that family with
/model. The session and weekly limits are shared across all models, so switching does not help with those. - On Pro and Max,
/usage-creditsbuys more usage. On Team and Enterprise it sends the request to your admin.
Sources: Anthropic, Claude Code error reference; the older wording from GitHub issue #6457.
You've hit your org's monthly spend limit
You've hit your monthly spend limit · raise it at https://claude.ai/settings/usage?from=cc_cli_limit_messageYou've hit your org's monthly spend limit · visit https://claude.ai/admin-settings/usage to raise itWhat it means. Your plan's included usage cannot cover the request, and the usage credits that would pay for it have reached a spend limit. The message names whose limit it is, yours or your organization's, and the text after the dot says how to get it raised.
How to fix it
- On Pro and Max, raise your monthly spend limit in Settings > Usage on claude.ai, or run
/usage-credits. - On Team and Enterprise, raise it in Organization settings > Usage if you manage billing. If you do not,
/usage-creditssends the request to your admin for you. - If the message also names a reset time for your plan's window, you can wait for it instead.
- Run
/usageto see your plan's windows and when each one resets.
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
- Run
/statusand confirm the active credential is the one you expect. A strayANTHROPIC_API_KEYin your environment can send requests through a low-tier key instead of your subscription. - Check your provider's console for the limits in force, and request a higher tier if you need one.
- Send fewer requests at once: run fewer subagents in parallel, lower
CLAUDE_CODE_MAX_TOOL_USE_CONCURRENCY, or use a smaller model with/modelfor high-volume scripted runs.
Sources: Anthropic, Claude Code error reference; Anthropic API errors.
OAuth token has expired, or Not logged in
Please run /login · API Error: 401 OAuth token has expired ...OAuth token revoked · Please run /loginNot logged in · Please run /loginWhat it means. Your saved login is no longer valid. Expired means the automatic refresh failed during the session; revoked means you signed out everywhere or an admin removed your access.
How to fix it
- Run
/loginat the Claude Code prompt and sign in again. - If a
claude -pcommand or an Agent SDK program hit the error, runclaudein the same environment, complete/login, then run the command again. - For automation that cannot sign in by hand, use an
ANTHROPIC_API_KEYor a long-lived token fromclaude setup-token. - If it asks you to log in on every launch, work through the system clock and macOS credential-storage checks in Anthropic's install troubleshooting.
Invalid API key
Invalid API key · Fix external API keyInvalid API key · Please run /loginWhat it means. The API rejected the key Claude Code sent from the ANTHROPIC_API_KEY environment variable or an apiKeyHelper script. The second line is an older wording users reported.
How to fix it
- Check the key for typos, and confirm in the Claude Console that it has not been revoked.
- In the same shell, run
env | grep ANTHROPIC, or in PowerShellGet-ChildItem Env:ANTHROPIC*. direnv, dotenv shell plugins and IDE terminals can load a stale key from a.envfile in your project. - To use your subscription instead, unset
ANTHROPIC_API_KEYand run/login. - Run
/statusto confirm which credential Claude Code is using now.
Sources: Anthropic, Claude Code error reference; the older wording from GitHub issue #5167.
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, or a deny rule prevented it. The report this wording comes from was a claude -p run with Bash(git commit:*) in its allowed tools.
How to fix it
- Run
/permissions. It lists every permission rule and the settings file each one comes from. - Remove or narrow the rule that blocks the tool. Rules are checked deny first, then ask, then allow, and the first match wins.
- For
claude -p, allow the tool up front with--allowedTools, either the whole tool ("Bash") or a pattern such as"Bash(git commit *)". - If your organization's managed settings deny the tool, no other setting can allow it. Ask your admin.
Sources: Anthropic, Claude Code permissions; Anthropic, running Claude Code programmatically; the message from GitHub issue #1520.
MCP server not connecting: Failed to connect, or Connection closed
✘ Failed to connectMCP error -32000: Connection closedWhat it means. Claude Code could not start or reach one of the MCP servers in your configuration. claude mcp list prints the first line beside that server; the failure is the server's, not the list command's.
How to fix it
- Run
claude mcp get <name>and read itsIssue:line. It carries the status code or error code and any text the server sent back. - Open
/mcpinside Claude Code and choose Reconnect from that server's menu. - If the server lives in a project's
.mcp.jsonand shows Pending approval, runclaudein that folder and approve it. - Give local scripts in
commandorargsas absolute paths. A relative path is why a server starts from one directory and fails from another. - If the server is slow to start, raise
MCP_TIMEOUTfrom its default of 30000 milliseconds, for exampleMCP_TIMEOUT=60000 claude.
Sources: Anthropic's Claude Code MCP docs and configuration debugging page; the Connection closed report, which was intermittent at session start, is GitHub issue #90844.
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 model reviews each action before it runs, and with server-side review that check happens on Anthropic's servers. When it gives no verdict, auto mode denies that action, and after ten responses in a row with no verdict it stops the turn.
How to fix it
- Send another message to have Claude try again. The count of responses starts over.
- If your requests go through an LLM gateway or proxy and the stop repeats, check whether it cuts streaming responses short or rewrites them.
- Set
CLAUDE_CODE_AUTO_MODE_SERVER=0before you start Claude Code to have it make its own classifier requests instead. On a direct connection to the Anthropic API this needs version 2.1.281 or later, so runclaude updatefirst. - To approve the actions yourself, switch out of auto mode.
command not found: claude
zsh: command not found: claudebash: claude: command not found'claude' is not recognized as an internal or external commandWhat 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
- Check the program is there:
ls -la ~/.local/bin/claude. If the file does not exist and you did not install Claude Code another way, such as with npm, Homebrew or a Linux package manager, install it again. - On macOS with Zsh, run
echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.zshrcand thensource ~/.zshrc. With Bash on Linux, use~/.bashrcin both commands. - On Windows, add the folder to your user PATH and open a new terminal.
- If
claudenow runs but misbehaves, runclaude doctorfor installation diagnostics.
Running several sessions at once
The context errors at the top of this page are easier to prevent than to clear, and with several sessions open it is hard to keep an eye on each one. Omniscio, the desktop app we make for running many Claude Code sessions at once, shows how full each session's context is and warns you at 75% and 90%. The features page lists the rest of it, and the download page has the installers.
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.
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.
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 twelve common messages and links each one to its source.