{"version":"2.1.326","anchor":"automatic-max-tokens-downshift-and-retry-on-provider-rejecti","canonical_anchor":"automatic-max-tokens-downshift-and-retry-on-provider-rejecti","heading":"Requests rejected over the output limit are retried with a lower limit","tier":"notice","area":"API","scope":"individual","heads_up":false,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.326\/e\/automatic-max-tokens-downshift-and-retry-on-provider-rejecti","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.326","markdown":"### Requests rejected over the output limit are retried with a lower limit\n\nIf a provider rejects the output token limit, Claude Code resends with a lower one and keeps it for that model until \/clear, compaction or resume\n\n**What**\n\nWhen a provider rejects a request because of its maximum output length (the most tokens Claude may write in one reply) with an error code of 400, 402, 413, 422 or 429, Claude Code now resends the request with a lower limit instead of failing.\n\nThe lower limit stays in place for that model until one of these happens:\n\n- you run `\/clear`\n\n- the conversation is compacted\n\n- you resume a session\n\n- you switch provider\n\nA warning tells you that you can set `CLAUDE_CODE_MAX_OUTPUT_TOKENS` to choose a different limit.\n\n**Why**\n\nRequests that used to stop on an output-limit error can now recover on their own. If the lowered limit cuts replies shorter than you want, `CLAUDE_CODE_MAX_OUTPUT_TOKENS` lets you set the value yourself.\n\n- Area: API\n- Tier: You'll notice\n- Useful: 3\/5\n- Signal: 2\/5\n- Scope: individual\n- Heads-up: no"}