Claude Code Stopped Working? Usage Limits, 529 Overloaded and Prompt Too Long
Why Claude Code stops: Pro and Max usage limits, 429, 500, 529 overloaded and Prompt is too long, with a fix for each and a capped key as backup.
When Claude Code refuses to continue, it is almost always one of three things. Your Pro or Max allowance is used up; Anthropic's servers are swamped for all users at once (error 529); or the thread has become too big for the model to read in one go ("Prompt is too long"). They look similar in the terminal but need different fixes. Below: how to tell them apart, what to do about each, and how to finish the job on a capped API key instead of waiting for the plan to reset.
Which problem do you have?
Compiled from Anthropic's own lists: Claude Code errors and API errors.
| You see | Meaning | First move |
|---|---|---|
You've hit your session limit or weekly limit | the plan allowance is gone | wait for the shown time, /usage-credits, or an API key |
400 (invalid_request_error) | something in the request is not acceptable | the text explains it; oversized history or files are the usual suspects |
429 (rate_limit_error) | rate limit or a short capacity squeeze | run fewer agents at once, pause |
500 (api_error) | a server-side fault, usually brief | wait a minute, look at status.claude.com |
529 (overloaded_error) | the whole API is busy, not your quota | /model to a different one, or come back shortly |
Prompt is too long | the thread exceeds what the model can hold | /compact, /clear, trim files, disable spare servers |
Plan limits on Pro and Max
From Anthropic's help center as of October 4, 2026 (Pro, Max, using Claude Code on those plans):
| Plan | USD per month, excl. tax | Per session | Per week |
|---|---|---|---|
| Pro | $20 | the baseline, refills every 5 hours | capped, across all models |
| Max 5x | $100 | five times Pro | capped |
| Max 20x | $200 | twenty times Pro | capped |
How it plays out:
- Chat and code share one pool. Every Claude surface you are signed into, terminal, browser, desktop or phone, spends from the same allowance. A long chat in the browser before lunch leaves less for the terminal later.
- A session lasts 5 hours. When it runs out, the terminal tells you when it refills, like
You've hit your session limit · resets 3:45pm. - The weekly cap resets at a fixed moment set for your account, whenever you happened to start. It can stop you even though a fresh 5-hour window has begun.
- Nobody publishes a message quota. How fast you burn through it varies with thread length, the files involved, the model and the feature you use. The 5x and 20x figures multiply the session cap only; the weekly cap is a separate matter.
- Opus can run out on its own.
You've hit your Opus limitleaves Sonnet available, so/modelover to it and continue.
/usage in Claude Code, or Settings, then Usage on claude.ai, shows what is left. Out of allowance, you have four options from Anthropic: sit it out, top up the plan with /usage-credits (billed like the API), upgrade, or swap in an API key. That last route gets its own section below.
Anthropic changes limits more often than prices, so read their current pages before switching plans.
529 overloaded
A 529 costs you no allowance, and nothing you did triggered it. Claude Code retries by itself, ten times by default with growing pauses, and only then prints Repeated 529 Overloaded errors. Because each model has its own capacity, switching with /model is the fastest escape, for instance from Opus to Sonnet. One version of the message even says so: Opus is experiencing high load, please use /model to switch to Sonnet.
500 and 429
500 errors are retried automatically too. When they persist, I glance at the status site and take a break instead of hammering the same request. For 429, cutting parallel work usually helps: fewer subagents at a time, or a lower CLAUDE_CODE_MAX_TOOL_USE_CONCURRENCY.
Context full: "Prompt is too long"
The history, the files the agent has read, the tool definitions and CLAUDE.md together no longer fit the model's window. I work through it in this order:
/compactreplaces early messages with a summary. Add instructions on what must survive, like/compact keep the test output./clearwipes the slate, the right call once a task is done or when you seeautomatic compaction failed./contextshows the split between the system prompt, tool schemas, memory files and the messages themselves.- Disable unused MCP servers. Their tool schemas ride along with each call. Switch spare ones off in
/mcp. - Slim down
CLAUDE.mdand what you paste into the chat. Cut big logs before handing them to the agent. - Use a smaller model for routine steps. Haiku's window is not larger, but renames and formatting cost less per step, and short sessions rarely hit the ceiling.
Still stuck after compacting? Install the latest Claude Code release, since recent versions fixed several bugs where sessions looped on this error.
How the codes differ on Kadraris
With a Kadraris key behind Claude Code, some answers change shape:
- trouble at the model (overload, server fault) shows up as
502(api_error) stating that nothing was billed, and Claude Code tries again on its own, 429means the model is busy or the key went above 600 requests per minute,- an oversized context comes back as
400with the model's own wording; use the same fixes as above, 402signals an empty balance and403a key that has used its monthly cap.
Every code is listed in the errors docs.
Finish the task on a capped key
Let me be precise here. Using a Kadraris key is not a loophole in Anthropic's limits; it is simply another billing route. Tokens are charged to money you loaded in advance, so the subscription allowance plays no part during that time. What limits you instead is your balance and whatever cap you gave the key.
My routine when the allowance ends mid-task:
- A dedicated key from the dashboard, named something like "claude-code-fallback" and given a monthly cap. Once that is spent the API refuses with
403, so the budget holds. - Variables set for this terminal window only, leaving my normal setup untouched.
macOS and Linux:
export ANTHROPIC_BASE_URL=https://kadraris.com
export ANTHROPIC_AUTH_TOKEN=sk-kd-...
export ANTHROPIC_MODEL=claude-sonnet-5
claude --continueWindows PowerShell:
$env:ANTHROPIC_BASE_URL = "https://kadraris.com"
$env:ANTHROPIC_AUTH_TOKEN = "sk-kd-..."
$env:ANTHROPIC_MODEL = "claude-sonnet-5"
claude --continueclaude --continuereopens the latest conversation in that folder. Remember that all of that history is billed as input. For a big thread I compact it first, or clear it and give the agent a short recap./statusshould showhttps://kadraris.comas the base URL.
Back to the plan afterwards
- shut the window, or delete the variables (
unset ANTHROPIC_BASE_URL ANTHROPIC_AUTH_TOKEN ANTHROPIC_MODEL; in PowerShellRemove-Item Env:ANTHROPIC_BASE_URL, Env:ANTHROPIC_AUTH_TOKEN, Env:ANTHROPIC_MODEL), - start
claudein a fresh window;/statusshould show the claude.ai account again, - if it does not,
/loginreconnects the subscription.
Watch for a leftover ANTHROPIC_API_KEY. If it is set globally, Claude Code quietly bills that key rather than your subscription. A backup key should never live in ~/.claude/settings.json. Variable reference: Claude Code docs; complete walkthrough: the base URL guide.
Pricing a fallback hour
Two numbers drive it, tokens read and tokens written:
cost = input_M × input_rate
+ output_M × output_rateIllustration only, I did not measure this: sixty busy minutes in a medium codebase, with 3M tokens going to the model (files, terminal output, history) and 60K coming back.
| Model | Per 1M tokens (in / out) | That hour |
|---|---|---|
| Claude Haiku 4.5 | $1.35 / $6.75 per 1M tokens | 3 × in + 0.06 × out |
| Claude Sonnet 5 | $3.24 / $16.20 per 1M tokens | 3 × in + 0.06 × out |
| Claude Opus 5.5 | $3.78 / $18.90 per 1M tokens | 3 × in + 0.06 × out |
The formula treats all input alike. In practice much of it is context read back from the cache, which Haiku 4.5 and Opus 5.5 bill at their lower cache rate (shown on each model page); Sonnet 5 has no cache rate, so there every input token costs the full rate. Since input dominates, the same habits that prevent "Prompt is too long" (/compact, /clear, fewer MCP servers) also cut the cost. To know what a session really cost, read the balance at the start and at the end:
curl https://kadraris.com/v1/balance \
-H "Authorization: Bearer sk-kd-..."In the dashboard, the usage view separates cache-read input from the rest. Funds never lapse and nothing renews monthly, so money loaded for emergencies just waits for the next one. For subscription against tokens in detail, see what Claude Code costs.
Questions
My plan says the limit resets at 3:45pm. Can I keep working before then?
Yes, in two ways: buy extra usage with /usage-credits, or switch the session to an API key as shown above. With a key you pay per token from your balance until you switch back.
Does retrying a 529 cost me anything?
No allowance is used by a 529. On a Kadraris key, a request that fails on the model side is not charged either.
Can I run DeepSeek, GLM or GPT inside Claude Code through Kadraris?
No. Claude Code talks Anthropic's protocol, and on Kadraris that route (/v1/messages) only knows Claude; any other id gets 404. For those models, use a tool built on the OpenAI protocol, like Cline, Roo Code, OpenCode, Aider or Continue, set to https://kadraris.com/v1 with ids such as deepseek-v4-flash, glm-5.2 or gpt-6-sol.
Why does "Prompt is too long" come back right after /compact?
Usually because something else fills the window: many active MCP servers, a long CLAUDE.md, or large files the agent keeps rereading. Check /context, turn off unused servers, and update Claude Code if the problem persists.


























