{"version":"2.1.336","anchor":"sdk-task-updated-schema-failure-field-and-waiting-on-agents","canonical_anchor":"sdk-task-updated-schema-failure-field-and-waiting-on-agents","heading":"Task updates can report a subagent that ended on an API error","tier":"use","area":"SDK","scope":"individual","heads_up":false,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.336\/e\/sdk-task-updated-schema-failure-field-and-waiting-on-agents","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.336","markdown":"### Task updates can report a subagent that ended on an API error\n\nTask updates gain a `failure` field for a subagent that ended on an API error, and a killed update now also covers giving up on waking it\n\n**What**\n\nTask updates sent to programs built on the SDK gain an optional `failure` field, marked internal. It is used when a subagent (a helper Claude starts for part of a task) ended on an error from the API, and holds the two parts that its summary ends with.\n\nThe description of `waiting_on_agents` now also says that a \"killed\" update arrives when Claude Code gives up trying to wake the subagent.\n\n**Why**\n\nPrograms get API-error failures as structured data, and know to expect a killed update when a waiting subagent cannot be woken.\n\n- Area: SDK\n- Tier: Use it now\n- Useful: 3\/5\n- Signal: 2\/5\n- Scope: individual\n- Heads-up: no"}