{"version":"2.1.321","anchor":"api-error-gains-a-cut-field-for-max-output-tokens","canonical_anchor":"api-error-gains-a-cut-field-for-max-output-tokens","heading":"Cut-short API errors now say what cut the reply","tier":"notice","area":"SDK","scope":"individual","heads_up":false,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.321\/e\/api-error-gains-a-cut-field-for-max-output-tokens","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.321","markdown":"### Cut-short API errors now say what cut the reply\n\nThe max_output_tokens API error now has a cut field, output_limit or context_window, saying why Claude's reply was cut short\n\n**What**\n\nWhen Claude's reply is cut short, Claude Code reports a `max_output_tokens` API error. That error now has a `cut` field saying which limit stopped the reply.\n\n- The SDK schema adds `cut` with two values: `output_limit` and `context_window`. The SDK is the toolkit for building programs on top of Claude Code.\n\n- When the reply hits the output limit, the error includes `apiErrorParams: { cut: \"output_limit\" }`.\n\n**Why**\n\nPrograms built on Claude Code can tell the two causes apart. A reply can stop because it hit the most text allowed in one answer (`output_limit`) or because the conversation ran out of room (`context_window`).\n\n- Area: SDK\n- Tier: You'll notice\n- Useful: 2\/5\n- Signal: 1\/5\n- Scope: individual\n- Heads-up: no"}