{"version":"2.1.301","anchor":"new-env-var-caps-how-long-the-retry-watchdog-waits-on-a-usag","canonical_anchor":"new-env-var-caps-how-long-the-retry-watchdog-waits-on-a-usag","heading":"New setting limits how long Claude Code waits after hitting a usage limit","tier":"use","area":"Usage & Limits","scope":"individual","heads_up":false,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.301\/e\/new-env-var-caps-how-long-the-retry-watchdog-waits-on-a-usag","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.301","markdown":"### New setting limits how long Claude Code waits after hitting a usage limit\n\nSet `CLAUDE_CODE_RETRY_WATCHDOG_MAX_USAGE_LIMIT_WAIT_MS` to make a request fail instead of waiting past that time on a usage limit\n\n**What**\n\nThere is a new environment variable, `CLAUDE_CODE_RETRY_WATCHDOG_MAX_USAGE_LIMIT_WAIT_MS`. An environment variable is a named setting you give a program when you start it, for example in your shell. Its value is a time in milliseconds.\n\nWhen a request is refused because you have reached a usage limit, the server says how long to wait before trying again. Claude Code subtracts the time it has already spent waiting on usage limits from this setting. If the server's wait is longer than what is left, the request fails with the reason `api_request_usage_limit_wait_too_long` instead of waiting. Without the setting there is no limit.\n\nThis variable also joins `CLAUDE_CODE_RETRY_WATCHDOG_MAX_WAIT_MS` in deciding whether Claude Code skips a check because of its retry watchdog, a timer that watches requests being tried again. The skip now happens only when neither variable is set.\n\n**Why**\n\nRuns that nobody is watching, such as scripts or automated jobs, can stop promptly at a usage limit instead of waiting a very long time.\n\n- Area: Usage & Limits\n- Names: `CLAUDE_CODE_RETRY_WATCHDOG_MAX_USAGE_LIMIT_WAIT_MS`\n- Tier: Use it now\n- Useful: 5\/5\n- Signal: 3\/5\n- Scope: individual\n- Heads-up: no"}