Claude Code Errors and How to Fix Them
By Shubhranshu, creator of claudeagents · Last reviewed
Most Claude Code errors fall into four groups: the servers are busy (529, 500, timeouts), you're sending too much (429, usage limits, "prompt is too long"), your login is wrong (401, 403), or the setup is broken (command not found, model not found). Busy-server errors usually fix themselves, because Claude Code retries them automatically. For the others, the fix is usually one command: /compact, /login, /model or a reinstall.
Below is a quick table of every common error, then a section for each one with what it means and exactly what to do. Everything here comes from Claude Code's official error reference and troubleshooting docs, checked on 28 November 2026.
Not sure what's wrong? Run /doctor inside Claude Code for an automatic check of your install, settings and context, or claude doctor in your terminal if Claude Code won't start.
Claude Code error messages at a glance
| Error message | What it means | Fix |
|---|---|---|
| API Error: Repeated 529 Overloaded errors | Anthropic's servers are busy | Wait; Claude Code already retries. Check status.claude.com |
| API Error: 500 / No response from API / Request timed out | A temporary server or network problem | Retry; check status.claude.com and your gateway |
| Request rejected (429) | Too many requests in a short time | Wait a moment; it's retried automatically |
| You've hit your session limit / weekly limit | Your plan's usage limit is used up | Wait for the reset, or add usage credits |
| Prompt is too long / Context limit reached | The conversation is bigger than the context window | Run /compact or /clear |
| API Error: 401 / Login expired · Please run /login | Your login or key is invalid or expired | Run /login (or claude auth logout, then sign in) |
| 403 / This organization has been disabled | Your account or organization blocks access | Contact your admin or Anthropic support |
| Model ... not found / not available with the Claude Pro plan | Wrong model name, or your plan doesn't include it | Pick another model with /model |
| claude: command not found | Claude Code isn't installed or isn't on your PATH | Reinstall, then open a new terminal |
"529 Overloaded" and "Opus is experiencing high load"
A 529 means Anthropic's API is temporarily overloaded. It's not caused by your code, your prompt or your account. You'll see messages like API Error: Repeated 529 Overloaded errors or Opus is experiencing high load.
Claude Code already retries these automatically with a growing pause between tries, so if you see the error, the retries ran out.
- Wait a few minutes and send your message again.
- Check status.claude.com for an ongoing incident.
- If you're in a hurry, switch to another model with
/model. A different model can have spare capacity.
"API Error: 500", "No response from API" and timeouts
These are temporary server or network problems. Like 529, Claude Code retries them automatically. If they keep happening, check status.claude.com. If your company routes Claude Code through a gateway or proxy, check that too, because it may be the part that's failing.
"Request rejected (429)" and rate limits
A 429 means too many requests were sent in a short time. Short throttles are retried automatically, so usually you only need to wait a moment.
If you use Claude Code through a company gateway, a 429 can also mean a spend limit was reached. That one doesn't fix itself, so ask your admin to raise the limit.
"You've hit your session limit" or "weekly limit"
On Pro, Max and Ultra plans, Claude Code shares usage limits with your Claude account: one that resets every 5 hours and one that resets every week. When you hit one you'll see You've hit your session limit or You've hit your weekly limit (or a limit for a specific model, such as Opus).
- Wait for the reset. The message tells you when.
- Add usage credits if your plan offers them.
- Use less per task: run
/clearbetween unrelated tasks, keep CLAUDE.md short, and use Sonnet or Haiku for simple work. Our subagent model guide shows how. - Check the cost of switching to an API key with our Claude Code cost calculator before you do it. API usage is billed per token.
"Prompt is too long" and "Context limit reached"
Every model has a maximum context window. When the conversation, the files Claude read and the tool outputs add up to more than that, you'll see Prompt is too long, Input is too long for requested model or Context limit reached · /compact or /clear to continue.
- Run
/compactto summarise the conversation and keep going. You can steer it, for example/compact keep only the plan and the diff. - Or run
/clearto start a fresh conversation if the old one isn't needed. - If it keeps happening, ask Claude to read big files in parts (a function or a line range), and move heavy reading into a subagent, which has its own context window.
If you see Autocompact is thrashing, a file or tool output keeps refilling the context right after compaction. Read that file in smaller chunks or run /clear, then use /context to see what's taking up the space.
Login errors: 401, "Login expired" and "Invalid API key"
A 401 means Claude Code's credential was rejected: the login expired, the OAuth token was revoked, or the API key is wrong. Messages include API Error: 401 Invalid authentication credentials, Login expired · Please run /login and Invalid API key.
- Run
/logininside Claude Code. - If that doesn't work, run
claude auth logoutin your terminal, then start Claude Code and sign in again. - If you set an
ANTHROPIC_API_KEYorANTHROPIC_AUTH_TOKENenvironment variable, check it's correct, or remove it to use your Claude subscription instead. Run/statusto see which credential is active.
403 errors and "This organization has been disabled"
A 403 means your credential works but isn't allowed to do this. Common messages are This organization has been disabled and Your organization has disabled API key authentication. These are account or policy settings, so contact your organization's admin. For personal accounts, use Get help in claude.ai.
If you're behind a company gateway and get a 403 Forbidden HTML page while the gateway logs show nothing, a web application firewall may be blocking Claude Code's requests. Your gateway team needs to exempt the /v1/messages path from request-body inspection.
"Model not found" and "not available with the Claude Pro plan"
This appears when the model name is wrong or your plan doesn't include that model, for example Claude Opus is not available with the Claude Pro plan. Open /model and pick a model from the list instead of typing an ID by hand. If you set ANTHROPIC_MODEL or a model in settings, check its spelling.
"claude: command not found" and install problems
This means Claude Code isn't installed, or your terminal can't find it on your PATH. Reinstall with the official command, then close and reopen your terminal.
# macOS, Linux or WSL
curl -fsSL https://claude.ai/install.sh | bash
# Windows PowerShell
irm https://claude.ai/install.ps1 | iex
# Then check it
claude --versionIf the footer says Auto-update failed · Run claude doctor, run claude doctor. Our beginner's guide walks through a full first install.
Claude Code not working in VS Code
If the extension won't connect or detect Claude, make sure you have the official Claude Code extension and VS Code 1.94 or later, then sign in from the extension panel. If the integrated terminal shows garbled characters, run /terminal-setup inside Claude Code; it turns off the terminal's GPU rendering, which is the usual cause. See our VS Code guide for the full setup.
Claude Code is slow, freezing or using lots of memory
- Use `/compact` regularly on long sessions, and restart Claude Code between big tasks.
- Frozen? Press Ctrl+C. If it's still stuck, close the terminal and run
claude --resumein the same folder to continue. - High memory warning (over 2.5 GB): restart and run
claude --continue. - Suspect a plugin, MCP server or hook? Start with
claude --safe-modeto test without them. - Search not finding files: install
ripgrepfrom your package manager and setUSE_BUILTIN_RIPGREPto0.
"Error editing file" and "File has been modified"
Claude Code edits a file by replacing exact text it read earlier. If the file changed after Claude read it (you saved it, a formatter ran, or another tool touched it), or the text it wanted to replace isn't there any more, the edit fails.
The fix is simple: tell Claude to read the file again and retry the change. If an auto-formatter keeps changing files mid-edit, run it after Claude finishes instead, for example with a hook that formats after edits.
Prevent errors before they happen
- Keep Claude Code updated; most install and login bugs are fixed in newer versions.
- Use
/clearbetween unrelated tasks to stay well under the context limit. - Set clear permission rules so Claude doesn't get stuck waiting on prompts.
- Write a short, focused CLAUDE.md with our CLAUDE.md generator.
- Want fewer long prompts and failed attempts? claudeagents gives Claude Code 85 ready-made agents and commands that do common jobs in one step.
Frequently asked questions
What does Claude Code error 529 overloaded mean?
It means Anthropic's API servers are temporarily overloaded. It isn't caused by your code or account. Claude Code retries automatically; if the error still shows, wait a few minutes, check status.claude.com, or switch model with /model.
Why is Claude Code not working today?
Check status.claude.com first for an outage. If nothing is reported, run /doctor in Claude Code (or claude doctor in your terminal) to check your install, login and settings, and read the exact error message against the table on this page.
How do I fix "Prompt is too long" in Claude Code?
Run /compact to summarise the conversation and continue, or /clear to start fresh. To stop it happening, read big files in parts, use subagents for heavy reading, and clear the conversation between unrelated tasks.
What is Claude Code error 400?
A 400 means the request was rejected as invalid, for example it was too large, had an image that was too big, or included a field the server doesn't accept (common behind third-party gateways). It can also appear when a spend limit you set is reached. The error text names the problem.
What is Claude Code error 403?
A 403 means your login works but isn't allowed to make this request, for example because your organization was disabled or blocks API-key sign-in. Contact your admin or Anthropic support. Behind a company gateway, a firewall rule can also cause it.
How do I fix Claude Code login errors?
Run /login inside Claude Code. If it still fails, run claude auth logout in your terminal and sign in again. If you set ANTHROPIC_API_KEY or ANTHROPIC_AUTH_TOKEN, check or remove it; /status shows which credential is active.
Where can I see the official list of Claude Code errors?
Anthropic keeps an error reference at code.claude.com/docs/en/errors and a troubleshooting page at code.claude.com/docs/en/troubleshooting. You can also run /doctor inside Claude Code for an automatic check.
Sources
Skip the setup: get 85 ready-made agents
Coding, SEO and marketing kits for Claude Code, with 52 skills and 53 slash commands. $29 one-time, lifetime updates.
See what's included →