Detailed guides for each error
- API Error: 500 (Internal server error) — outages, per-model failures, compaction at 0%.
- Overloaded / API Error 529 — capacity, retries, subagent bursts.
- API Error 400 — prompt is too long, tool use concurrency, and other rejected requests.
- OAuth errors — timeout of 15000ms exceeded, status code 500 at login.
- Process exited with code 1 — VS Code extension and desktop app crashes.
- Rate limit reached / 429 — the three limits and how to raise them.
- Prompt is too long / context limit reached — what fills the window, false alarms, compaction failures, claude.ai length limits.
- Usage limit reached — session, weekly and Opus windows, "specified API usage limits", "credit balance is too low".
- 401 / 403 authentication — invalid credentials, invalid API key, "Not logged in", host_not_allowed.
- Connection errors — ECONNRESET, "Waiting for API response", certificates, proxies, retry variables.
- Hangs, stuck, not responding — where it is stuck, escape keys, known hang bugs, memory.
- claude.ai not working — "Something went wrong", capacity constraints, 5-hour limit, login errors.
API error 500 (and 529 overloaded)
A 500 is an upstream failure; 529 is Anthropic's explicit "model at capacity" code. Neither is caused by your prompt. Claude Code retries a few times on its own; if it gives up, wait a minute and resume with claude -c. Switching tier with /model often works immediately because capacity is per model. On this gateway a saturated upstream account is failed over automatically, which is why 529s are rarer here than against a single account.
API error 400 — bad request / context too long
In Claude Code a 400 almost always means the conversation plus the files it has read no longer fit the model's window. /compact summarises history; /clear starts fresh; or switch to a (1M) variant of the model. Other 400s: an unsupported parameter after an upgrade (run claude update), or an image or file the model cannot accept.
API error 429 — rate limit / rate exceeded
Three limits apply: requests per minute, tokens per minute and concurrent requests. Agentic sessions hit concurrency first — every subagent is a parallel streaming request holding a slot until it finishes. Reduce parallelism, let the retry-after elapse, and for sustained work ask for a higher concurrency on your gateway account.
OAuth error: timeout of 15000ms exceeded
The /login flow could not reach Anthropic's auth service within 15 seconds. It is a network problem, not an account one: a corporate proxy, a VPN that drops the callback, or a region where the auth endpoint is slow. Retry once; if it persists, set HTTPS_PROXY for your network, or skip OAuth entirely by using an API key — with ANTHROPIC_API_KEY (and ANTHROPIC_BASE_URL for a gateway) Claude Code never opens the login flow at all.
OAuth error: request failed with status code 500
The auth service answered with a server error during login or token refresh. Nothing on your side causes it; wait a few minutes and run /login again. If you need to work now, the API-key route above bypasses OAuth, and claude setup-token on a machine where login works produces a long-lived token you can move to the one where it does not.
Error: Claude Code process exited with code 1
This is the IDE extension or desktop app reporting that the CLI it launched crashed at startup — the real error is one level down. Open a terminal and run claude directly: you will see the actual message, which is almost always a Node.js version below 18, a broken PATH after an npm install, a corrupt native install, or a settings.json with invalid JSON (a stray comma in a hooks block is a classic). claude doctor checks the first three; a JSON linter catches the fourth. Reinstalling with the native installer fixes most of the rest.
401 / authentication errors
invalid x-api-key or authentication_error means the key does not belong to the endpoint. If ANTHROPIC_BASE_URL points at the gateway, the key must be a gateway key; an Anthropic console key will be refused, and the reverse is also true. /status shows which endpoint and key are active. If you use /login and an API key at the same time, the key wins. Token-refresh loops, Not logged in after a successful login and 403s from proxies are on the 401 / 403 page.
"No healthy upstream"
Not an API error: it is the load balancer in front of a service reporting that no backend is available. On the official endpoint it means an outage; from a gateway it means the whole upstream pool is down or throttled. Wait and retry; do not change your configuration.
Claude Code not working at all
- Starts then exits silently → run
claude /doctor; usually a Node version or PATH problem. - Hangs at startup or mid-session → see hangs and stuck sessions and connection errors.
command not found→ see the install guide.- Tools fail with permission errors →
/permissions, or--allowedToolsin scripts.
Tired of fighting this one?
Run Claude Code through the AI Prime Tech gateway instead: the same Claude models on the gateway's own upstream accounts, two environment variables to switch, and new accounts get $5 in free API credit with code FIXIT — no card.
export ANTHROPIC_BASE_URL=https://aiprimetech.io
export ANTHROPIC_API_KEY=your_keyFrequently asked questions
Why does Claude Code keep returning API error 500?
The model backend is failing or overloaded (529 is the explicit form). Retry after a pause, switch tier with /model, or resume with claude -c. It is not your configuration.
How do I fix Claude Code error 400 context length?
Run /compact to summarise the session, /clear to reset, or switch to a 1M-context model variant.
Why does Claude Code say invalid API key?
The key does not match the endpoint in ANTHROPIC_BASE_URL. Gateway URL needs a gateway key; Anthropic URL needs a console key.
Run Claude Code on the gateway
Same models, two environment variables, credits at 7.69231× face value — or a flat-rate unlimited plan. New accounts: $5 in free API credit with code FIXIT.
Get an API key See unlimited plansAI Prime Tech is an independent API gateway and is not affiliated with, endorsed by, or sponsored by Anthropic. “Claude” and “Claude Code” are trademarks of Anthropic. Claude Code features described here follow Anthropic’s public documentation at the time of writing and change frequently; prices and model lists on this page are read from this gateway’s live settings.