Claude Code✓ Confirmed in official docsAdded Oct 14
How to cap the wait of Claude Code's unattended retry mode with an env var
When you run Claude Code unattended (CI, overnight jobs), retry mode keeps waiting out 429 and 529 errors. This variable caps how long each request waits, then lets the request fail. It only applies when CLAUDE_CODE_RETRY_WATCHDOG is set.
export CLAUDE_CODE_RETRY_WATCHDOG=1
export CLAUDE_CODE_RETRY_WATCHDOG_MAX_WAIT_MS=1800000
The value is the maximum time in milliseconds each request spends waiting, as a plain whole number without commas. 1800000 is 30 minutes. Once the time is spent, the next 429 or 529 error ends the request. If unset, the wait has no limit. Requires Claude Code v2.1.295 or later.
Sources
Get notified when a new tip lands
Tip alerts only go out in the app. Install it and turn notifications on.