{"version":"2.1.336","anchor":"new-retry-watchdog-cap-on-how-long-a-subagent-waits-out-a-mo","canonical_anchor":"new-retry-watchdog-cap-on-how-long-a-subagent-waits-out-a-mo","heading":"Subagents can be given a limit on how long they wait out a model rate limit","tier":"use","area":"Subagents","scope":"both","heads_up":false,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.336\/e\/new-retry-watchdog-cap-on-how-long-a-subagent-waits-out-a-mo","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.336","markdown":"### Subagents can be given a limit on how long they wait out a model rate limit\n\n`CLAUDE_CODE_RETRY_WATCHDOG_MAX_SUBAGENT_MODEL_LIMIT_WAIT_MS` caps a subagent's wait on a model rate limit when `CLAUDE_CODE_RETRY_WATCHDOG` is set\n\n**What**\n\nA subagent is a helper agent that Claude Code starts to work on part of a task. Claude Code now reads a new environment variable, `CLAUDE_CODE_RETRY_WATCHDOG_MAX_SUBAGENT_MODEL_LIMIT_WAIT_MS`, which caps how long a subagent waits when it runs into a rate limit for a model. An environment variable is a value you set in your shell before starting Claude Code. A rate limit is a cap on how much you can use a model in a given period.\n\nThe cap only applies when all of these hold:\n\n- `CLAUDE_CODE_RETRY_WATCHDOG` is set.\n\n- `CLAUDE_CODE_RETRY_WATCHDOG_MAX_SUBAGENT_MODEL_LIMIT_WAIT_MS` is set.\n\n- Claude Code knows which kind of rate limit was hit.\n\n- The limit is a model limit, or the model passes a further check.\n\nOtherwise this setting has no effect. Claude Code uses it in two places, one of them the path that retries failed requests.\n\n**Why**\n\nIf you run Claude Code unattended with the retry watchdog switched on, you can stop a subagent from stalling for a long time on a model rate limit.\n\n- Area: Subagents\n- Names: `CLAUDE_CODE_RETRY_WATCHDOG_MAX_SUBAGENT_MODEL_LIMIT_WAIT_MS`\n- Tier: Use it now\n- Useful: 5\/5\n- Signal: 3\/5\n- Scope: both\n- Heads-up: no"}