Claude Code Usage Limit, 529 and Prompt Too Long Fixes
Pro and Max session and weekly limits, fixes for 429, 500, 529 and "Prompt is too long" in Claude Code, and finishing a task on a capped API key.
Claude Code stops for three very different reasons: your Pro or Max plan ran out of usage, Anthropic's servers are overloaded (error 529), or the conversation no longer fits in the model's context window ("Prompt is too long"). Each one has a different fix. Below I go through what every message means, what to do right away, and how to finish the task on an API key with a spend cap when you don't want to wait for the plan to reset.
Pro and Max usage limits and when they reset
As of October 4, 2026, according to Anthropic's help center (Pro plan, Max plan, Claude Code on Pro and Max):
| Plan | Price (USD, before tax) | Session limit | Weekly limit |
|---|---|---|---|
| Pro | $20 a month | baseline, resets every 5 hours | yes, shared across all models |
| Max 5x | $100 a month | 5x the Pro session limit | yes |
| Max 20x | $200 a month | 20x the Pro session limit | yes |
What that means in practice:
- The limit is shared with chat. Claude Code, claude.ai, the desktop app and the mobile app all draw from one pool. A long browser chat in the morning leaves less for coding in the afternoon.
- The session window is 5 hours. When you run out, Claude Code shows the reset time, for example
You've hit your session limit · resets 3:45pm. - The weekly limit resets at a fixed time assigned to your account, no matter when you started working. It can block you even after a new 5-hour window has started.
- Anthropic does not publish a fixed message count. Usage depends on conversation length, file size, model and feature. The 5x and 20x multipliers apply to the session limit, not the week.
- Some limits are per model family.
You've hit your Opus limitmeans only the Opus allowance is gone: switch to Sonnet with/modeland keep going.
Check what is left with /usage in Claude Code, or in claude.ai under Settings, then Usage. When you hit a limit, Anthropic offers four ways out: wait, buy extra usage on the plan (/usage-credits, billed at API rates), upgrade, or point Claude Code at an API key. The last option is covered below.
Plan limits change more often than prices, so check Anthropic's current pages before you change plans.
Errors 400, 429, 500, 529 and "Prompt is too long"
Based on the Claude Code error reference and the Anthropic API error docs:
| Message | What it means | What to do |
|---|---|---|
You've hit your session limit / weekly limit | plan allowance used up | wait for the time shown, /usage-credits or an API key |
400 (invalid_request_error) | request rejected because of its content or format | read the message, usually the context or an attachment is too large |
429 (rate_limit_error) | rate limit on the key or a temporary capacity issue | run fewer agents in parallel, wait a bit |
500 (api_error) | server-side failure, usually temporary | wait a minute, check status.claude.com |
529 (overloaded_error) | the API is overloaded for everyone, not your limit | /model to another model, retry in a few minutes |
Prompt is too long | the conversation exceeds the model's context window | /compact, /clear, fewer files and MCP servers |
529 overloaded
A 529 does not count against your plan and is not your fault. Claude Code retries on its own (up to 10 times by default, with growing delays) and only then shows Repeated 529 Overloaded errors. Capacity is tracked per model, so the fastest fix is /model, for example from Opus to Sonnet. One variant of the message says exactly that: Opus is experiencing high load, please use /model to switch to Sonnet.
500 and 429
Claude Code also retries 500 errors automatically. If the message keeps coming back, I check Anthropic's status page and take a break instead of sending the same prompt in a loop. For 429, less parallelism usually helps: fewer subagents at once or a lower CLAUDE_CODE_MAX_TOOL_USE_CONCURRENCY.
Prompt is too long
This error means the conversation history, files read, tool definitions and CLAUDE.md together exceed the model's context window. The order I fix it in:
/compactsummarizes the older part of the conversation. You can say what to keep, for example/compact keep the test output./clearstarts a clean session, when the task is done or compaction failed (automatic compaction failed)./contextshows what takes up space: system prompt, tools, memory files, messages.- Fewer MCP servers. Every enabled server adds tool definitions to every request. Turn off the ones you don't use with
/mcp. - A shorter
CLAUDE.mdand smaller files pasted into the chat. Trim large logs before you show them to the agent. - A cheaper model for simple steps. Haiku does not have a bigger window, but for routine work (renames, formatting) every step costs less, and short sessions hit the context limit less often.
If the error comes back even after /compact, update Claude Code. Anthropic's changelog lists several fixes for sessions that got stuck on this message after compaction.
The same codes on a Jantaris key
When Claude Code runs on a Jantaris key, a few codes look slightly different:
- an overload or server error on the model side comes back as
502(api_error) saying you were not charged - a failed request costs $0, and Claude Code retries it on its own, 429means the model is busy right now or the key went over 600 requests per minute,Prompt is too longarrives as a400with the model's message, and the fix is the same as above,402means the balance is too low,403means the key reached its monthly spend limit.
The full list is in the errors docs.
Switch a session to an API key and back to your plan
To be clear up front: a Jantaris key does not get around Anthropic's limits. It is a different way to pay - instead of a subscription you pay for every token from a prepaid balance. The Pro or Max limit simply stops applying because you are not using the plan at that point. Your balance and the spend limit you set on the key take its place.
This is what I do when the plan runs out halfway through a task:
- In the dashboard I create a separate key, for example "claude-code-fallback", with a monthly spend limit. Once it is reached the API returns
403, so the agent can't spend more than I planned. - I set the variables only in the current terminal, so nothing changes permanently.
macOS and Linux:
export ANTHROPIC_BASE_URL=https://jantaris.com
export ANTHROPIC_AUTH_TOKEN=sk-jt-...
export ANTHROPIC_MODEL=claude-sonnet-5
claude --continueWindows PowerShell:
$env:ANTHROPIC_BASE_URL = "https://jantaris.com"
$env:ANTHROPIC_AUTH_TOKEN = "sk-jt-..."
$env:ANTHROPIC_MODEL = "claude-sonnet-5"
claude --continueclaude --continueresumes the latest conversation in that directory. Keep in mind the whole history goes to the model as input tokens, so in a long session I run/compactfirst, or start with/clearand a short note on where I left off./statusconfirms the base URL points tohttps://jantaris.com.
Going back to the plan:
- close that terminal or remove 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 new terminal and check/status- it should show your claude.ai login, - if things get mixed up,
/loginsigns you back in to the plan.
Watch out for ANTHROPIC_API_KEY: if it is set permanently, Claude Code uses that key instead of your plan and you pay API rates. If the key is only a fallback, keep it out of ~/.claude/settings.json. All variables, model selection and the gotchas after a base URL change are in the Claude Code docs.
What an hour of work costs on an API key
The cost depends on how many tokens the agent reads and writes:
cost = (M input tokens × input rate) + (M output tokens × output rate)An example to plug numbers into, not a measurement: say an hour of active work in a mid-sized repository where the agent sent 3M input tokens (files, command output, history) and wrote 60K output tokens.
| Model | Rate per 1M tokens (input / output) | The example hour |
|---|---|---|
| Claude Haiku 4.5 | $1.35 / $6.75 per 1M tokens | 3 × input rate + 0.06 × output rate |
| Claude Sonnet 5 | $3.24 / $16.20 per 1M tokens | 3 × input rate + 0.06 × output rate |
| Claude Opus 5.5 | $5.40 / $27.00 per 1M tokens | 3 × input rate + 0.06 × output rate |
Input dominates the bill, so /compact, /clear and fewer MCP servers cut the cost the same way they prevent "Prompt is too long". I check the exact cost of a session by comparing the balance before and after:
curl https://jantaris.com/v1/balance -H "Authorization: Bearer sk-jt-..."The usage page in the dashboard also shows how much of the input was billed as cache reads. The balance never expires and there is no subscription, so a top-up for fallback hours can sit in the account until you need it again. Subscription versus pay per token is compared in Claude Code pricing - subscription vs pay per token.
FAQ
When does the Claude Code limit reset on Pro?
The session limit resets every 5 hours, and the weekly limit at a fixed time assigned to your account. The limit message and the /usage command show the exact time.
Does a 529 error use up my limit?
No. A 529 means Anthropic's API is overloaded for everyone. Claude Code retries on its own, and if that doesn't help, switch models with /model and try again in a few minutes.
How do I fix "Prompt is too long"?
Start with /compact. If that isn't enough, /clear and describe the task again briefly. /context shows what takes up space - often unused MCP servers or a long CLAUDE.md.
Does Jantaris bypass Anthropic's plan limits?
No. Jantaris is pay per token through an API key, not access to a Pro or Max plan. You pay for every request from your balance, and your spend is capped by the balance and the monthly limit you set on the key.
Does Claude Code work with DeepSeek, GLM or GPT?
Not through Jantaris. Claude Code speaks the Anthropic format, and the Jantaris /v1/messages endpoint serves Claude models only - other ids return 404. DeepSeek, GLM and GPT work through OpenAI-compatible tools (Cline, Roo Code, OpenCode, Aider, Continue) with the base URL https://jantaris.com/v1, using ids such as deepseek-v4.1-flash, glm-5.3 or gpt-6-sol. Setup for each of those tools is in the Claude Code and IDE tools docs.
How do I switch back from an API key to Pro or Max?
Remove ANTHROPIC_BASE_URL and ANTHROPIC_AUTH_TOKEN (or close the terminal where you set them), start claude again and check /status. If it still shows the key, use /login.












