{"version":"2.1.307","anchor":"new-api-error-kind-empty-completion","canonical_anchor":"new-api-error-kind-empty-completion","heading":"Blank replies end as an error for programs built on Claude Code","tier":"notice","area":"Agents","scope":"individual","heads_up":false,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.307\/e\/new-api-error-kind-empty-completion","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.307","markdown":"### Blank replies end as an error for programs built on Claude Code\n\nIf the model gives a blank reply to your prompt twice in a row, the turn now ends with an `empty_completion` error\n\n**What**\n\nThe Agent SDK lets developers build their own programs on top of Claude Code. When a turn fails because of the API, the result can name the kind of failure. There is now a new kind, `empty_completion`.\n\nIt is used when the model finishes its turn without any visible text, Claude Code retries once, and the retry also comes back with no content, all in reply to a prompt a person wrote. Claude Code then ends the turn as an error instead of returning an empty reply.\n\n**Why**\n\nPrograms built on Claude Code can show a clear failure instead of a blank answer, and can handle it as a specific error.\n\n- Area: Agents\n- Names: `empty_completion`\n- Tier: You'll notice\n- Useful: 3\/5\n- Signal: 2\/5\n- Scope: individual\n- Heads-up: no"}