Claude Code 529 Overloaded: Retry Variables & Idle Compaction

Blog / Troubleshooting

Claude Code 529 Overloaded: Retry Variables & Idle Compaction

A 529 overloaded error in Claude Code means Anthropic's side is temporarily overloaded. It is usually not a problem with your network or your account. As of October 17, 2026, the official CHANGELOG for versions 2.1.295 through 2.1.302 adds several configurable behaviors around 529 and 429 retries and around prompt-cache expiry in long conversations. This article turns the changelog entries into a cheat sheet and suggests an order of "diagnose first, tune second." Everything below is based only on that changelog; check the official docs for exact defaults and details.

What are 529 and 429?

  • 529 Overloaded: the server is overloaded. Retrying a little later usually works.
  • 429: the request was rate limited, or you hit a usage limit.

Claude Code retries automatically on both. The point of this update is how long a retry waits, how long an unattended session may wait at most, and whether to simply stop when a usage limit resets too far in the future.

Which variables and settings are new?

NameVersionWhat it does (per the changelog)
CLAUDE_CODE_OVERLOADED_RETRY_MAX_DELAY_MS2.1.296Sets the maximum backoff delay for 529 retries; you can raise it
CLAUDE_CODE_RETRY_WATCHDOG_MAX_WAIT_MS2.1.295Caps how long the unattended retry mode (CLAUDE_CODE_RETRY_WATCHDOG) waits on 429 and 529
CLAUDE_CODE_RETRY_WATCHDOG_MAX_USAGE_LIMIT_WAIT_MS2.1.301In unattended retry mode, ends the request instead of waiting when the usage limit resets too far away
CLAUDE_CODE_IDLE_COMPACT_MIN_TOKENS2.1.299Changes the 200,000-token minimum for idle compaction
"idleCompaction": false (settings.json)2.1.299Turns off idle compaction; since 2.1.302 there is also an Idle compaction row in /config

The _MS suffix means milliseconds. The changelog entries do not give default values, so don't guess; check the official docs first.

Example: put a cap on a batch job

Say you run Claude Code unattended on a server and don't want it to hang forever on a 529 or an exhausted quota. The values below are only examples; adjust them for your own job:

export CLAUDE_CODE_RETRY_WATCHDOG=1
# Wait at most 10 minutes in total (example value)
export CLAUDE_CODE_RETRY_WATCHDOG_MAX_WAIT_MS=600000
# If the usage limit won't reset for a long time, end the request (example value, 3 hours)
export CLAUDE_CODE_RETRY_WATCHDOG_MAX_USAGE_LIMIT_WAIT_MS=10800000

The changelog doesn't say what value CLAUDE_CODE_RETRY_WATCHDOG itself should have, so check the official docs. The meaning of the other two variables should also be confirmed there; the values here only demonstrate the format.

For interactive use, if you want Claude Code to wait longer on a 529 instead of failing quickly, raise CLAUDE_CODE_OVERLOADED_RETRY_MAX_DELAY_MS.

What is idle compaction, and should you turn it off?

Added in 2.1.299: when a conversation of 200,000 tokens or more sits idle for about 54 minutes, it is compacted automatically, before the one-hour prompt cache expires. That way, when you come back and send the next message, Claude Code doesn't have to reprocess the whole long context. The feature works in the terminal.

  • To change the trigger threshold, set CLAUDE_CODE_IDLE_COMPACT_MIN_TOKENS.
  • To turn it off, put "idleCompaction": false in settings.json, or switch off Idle compaction in /config on version 2.1.302 or later.
  • Both of these require version 2.1.290 or later.

If you rely on the original details in a conversation and don't want them rewritten by compaction, turn it off. If you often come back to a long session after a break, leaving it on saves reprocessing cost. For why caching affects cost, see How to use Claude prompt caching to save money.

  • 2.1.299 fixed /usage, the near-limit warnings, and the status bar sometimes showing more than 100%. If you've seen readings above 100%, upgrade and check again.
  • In 2.1.295, command and HTTP hooks support onFailure: "block": if a hook fails to start, times out, or exits with an unexpected code, the action is blocked instead of allowed.
  • Since 2.1.295, machines without managed settings can also use forceLoginMethod: "gateway" and forceLoginGatewayUrl in user settings, so that /login points at the Claude apps gateway.

What to check first when you see a 529

  1. Check official status: open cdnping's Anthropic status page and compare it with the official Anthropic status page. If Anthropic has an open incident, it is almost certainly a server-side problem, so wait for recovery.
  2. Tell the error codes apart: 529 is overload, 429 is rate limiting or quota. For quota problems, check /usage and see Claude Max 5x vs 20x: Claude Code quota and weekly limits.
  3. If the official status is normal but requests still fail, look locally. Timeouts and handshake failures look more like network problems; follow the Claude Code connection timeout checklist, or check the path with the egress IP check and the online speed test.
  4. If it feels slow but there is no error, see Why is Claude Code slow.
  5. For background on recent incidents, see the September 29 outage postmortem.

Can you change the API endpoint?

Claude Code supports a custom API endpoint; for setup, see Custom API endpoints for Claude Code, Codex and OpenCode. AGI Plan is a commercial partner of cdnping and provides a Claude Code-compatible setup guide (startup). You only change one endpoint URL, and no Claude account is needed. It is not an officially authorized channel, and some models are available only outside China; see the models page for specifics. This is just an optional route, and the retry settings above have nothing to do with it.

Sources

Related articles

Keep reading