← Blog

How-to6 min read

Claude Code errors: fixing 529 Overloaded, 429, Prompt is too long, and connection errors

What Claude Code's 529 Overloaded, 429 rate limit, Credit balance is too low, Prompt is too long and connection errors mean, and how to keep working.

Mirasim's agent and model picker, where you can switch a session to another agent or model when one provider is overloadedMirasim's agent and model picker, where you can switch a session to another agent or model when one provider is overloaded

Quick lookup by error message

Most runtime errors in Claude Code fall into four buckets: Anthropic server load (529 / 500), rate limits or billing (429 / Credit balance is too low), a full context window (Prompt is too long), or a proxy dropping the connection (Socket is closed / ECONNRESET). Check the exact line printed in your terminal below.

What you seeCauseFirst fix
API Error: Repeated 529 Overloaded errorsModel capacity full across all users (not your quota)Run /model to switch models, or wait and check status.claude.com
API Error: 500 Internal server errorTemporary server-side failure (or gateway 502/504)Retry in a moment; check status.claude.com or your gateway
Request rejected (429)API key, Bedrock, or Google Cloud rate limitRun /status to check active auth; wait or raise tier limit
Credit balance is too lowConsole balance is empty, or an old ANTHROPIC_API_KEY is overriding your planCheck /status; unset ANTHROPIC_API_KEY if on a plan, or add funds in Console
Prompt is too longConversation and attached files exceed context windowRun /compact to summarize history, or /clear to start fresh
Socket is closed / Unable to connect to APIProxy, firewall, VPN or DNS dropped the connectionRun claude update (v2.1.214+ retries closed sockets) and check proxy settings

529 Overloaded and 500 server errors

API Error: Repeated 529 Overloaded errors means the API is temporarily at capacity across all users. Claude Code already retried several times before printing it. A 529 is not your personal usage limit and does not count against your quota.

  • Switch models with /model: Anthropic tracks capacity per model, so when Opus is under heavy load, switching to Sonnet (or another available model) often lets you keep working right away.
  • Check the status URL named in the message: direct Anthropic traffic points to status.claude.com; Bedrock, Google Cloud's Agent Platform, Microsoft Foundry, and custom ANTHROPIC_BASE_URL gateways name their own status host.
  • For API Error: 500 (or API Error: 502 Bad Gateway from a proxy/gateway): the failure is inside the API or proxy, not in your prompt or account. Wait a moment and retry.

429 rate limits and “Credit balance is too low”

Server is temporarily limiting requests
A server-side throttle, not your subscription limit (Claude Code tells them apart by checking for unified quota headers). From v2.1.199, Claude Code retries this automatically with backoff across all sign-in types; if it persists, wait briefly and check status.claude.com.
Request rejected (429)
Your API key, Amazon Bedrock project, or Google Cloud project hit its configured rate limit (or a proxy/gateway in between returned its own 429). Run /status first to make sure a stray ANTHROPIC_API_KEY isn't hijacking a subscription.
Credit balance is too low
Your Claude Console prepaid balance is empty — or you have a Pro, Max, Ultra, Team or Enterprise plan, but an approved ANTHROPIC_API_KEY in your shell is routing requests through Console instead. Run /status, check the API key row, and either unset ANTHROPIC_API_KEY (and remove it from your shell profile) or top up at platform.claude.com/settings/billing.

“Prompt is too long” / “Context limit reached”

This appears when the conversation history plus files read into the session exceed the model's context window. In an interactive terminal session, Claude Code displays Context limit reached · /compact or /clear to continue; in non-interactive (-p) output and transcripts, it prints Prompt is too long.

  • Run /compact to summarize earlier turns and free space while keeping the current task.
  • Run /clear if you are moving to a new task — starting fresh also cuts token spend.
  • Check /config › Auto-compact: if you turned autoCompactEnabled off, Claude Code reminds you in the error line. If DISABLE_COMPACT is set in your environment, only /clear is offered.

Connection, timeout and proxy errors

Unable to connect to API
The TCP connection never completed. The code in parentheses tells you where it broke: ConnectionRefused / ECONNREFUSED (firewall or proxy blocking), ENOTFOUND (DNS or offline), EHOSTUNREACH (network route or VPN), ERR_PROXY_TUNNEL (proxy rejected the tunnel or credentials), or ECONNRESET (connection dropped mid-flight).
Socket is closed
The streaming connection closed while a reply was still arriving — most commonly behind a corporate proxy on Windows. Versions before v2.1.214 stopped the turn immediately; run claude update to v2.1.214 or later so Claude Code retries automatically, and check proxy settings if it keeps happening.
Request timed out
The default request timeout is 10 minutes. Setting API_TIMEOUT_MS=0 turns off that overall cap, though first-byte and streaming idle watchdogs still apply (and versions before v2.1.305 failed immediately when API_TIMEOUT_MS was 0 — update or set a positive millisecond value).
Streaming response ended before any complete data was received
A proxy or gateway buffered or modified the streaming response so no usable chunks arrived, and Claude Code retried without streaming (which sends the request twice). Configure your proxy or gateway to pass streaming response bodies and headers through unmodified.

Keep working in Mirasim when one provider is down

When Anthropic is returning repeated 529s or a single account hits its limit, you don't have to stop and re-explain the task in another terminal.

  • Switch agent in the same pane: move the session from Claude Code to Codex, Kimi Code, DeepSeek Harness or another installed agent — Mirasim carries the conversation over so the work picks up where it left off.
  • Switch account or credit source: keep multiple saved sign-ins with live quota status (under Settings › Agents), or switch a session to your own API key or Mirasim credit without editing shell profiles.

Questions

Does a 529 Overloaded error use my Claude quota?
No. Anthropic states that a 529 is a server-capacity error, not your usage limit, and doesn't count against your quota.
Why do I get “Credit balance is too low” when I pay for Claude Pro or Max?
An approved ANTHROPIC_API_KEY in your shell takes priority over a subscription login. Run /status to confirm, then unset ANTHROPIC_API_KEY, remove it from your shell profile, and restart claude.
How do I fix “Prompt is too long” without losing my progress?
Run /compact inside the session to summarize older turns into a shorter context. If auto-compact was turned off, re-enable it in /config.

Sources

Checked on November 29, 2026 against Anthropic's Claude Code errors reference at code.claude.com/docs/en/errors. Version thresholds and messages change as Claude Code updates; check that page and status.claude.com for the latest.

Keep reading