{"version":"2.1.327","anchor":"max-tokens-lowering-reworked","canonical_anchor":"max-tokens-lowering-reworked","heading":"Reply length cap is lowered more carefully after a rejected request","tier":"notice","area":"Elsewhere","scope":"individual","heads_up":false,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.327\/e\/max-tokens-lowering-reworked","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.327","markdown":"### Reply length cap is lowered more carefully after a rejected request\n\nClaude Code now works out the reply length cap for each request and keeps a lowered cap only once a reply actually starts\n\n**What**\n\n`max_tokens` is the most text a reply may contain. When a provider rejects a request, Claude Code can send it again with a lower `max_tokens`. That logic was reworked:\n\n- The ceiling is now worked out for each request\n\n- Continuing a reply that was cut off can cap the ceiling\n\n- A lowered cap is kept only once a reply actually starts arriving\n\n- The warning now says the request failed, and a reply began when it was sent again with a lower `max_tokens`\n\nSetting `CLAUDE_CODE_MAX_OUTPUT_TOKENS` overrides the ceiling.\n\n**Why**\n\nThis changes when and how Claude Code lowers the reply length limit after a failed request. Because a lowered cap is kept only after a reply begins, a retry that also fails no longer locks in a smaller limit.\n\n- Area: Elsewhere\n- Tier: You'll notice\n- Useful: 2\/5\n- Signal: 1\/5\n- Scope: individual\n- Heads-up: no"}