{"version":"2.1.336","anchor":"subagent-api-error-schema-message-details","canonical_anchor":"subagent-api-error-schema-message-details","heading":"Hooks can see the API error a subagent stopped on","tier":"notice","area":"Hooks","scope":"individual","heads_up":false,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.336\/e\/subagent-api-error-schema-message-details","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.336","markdown":"### Hooks can see the API error a subagent stopped on\n\nWhen a subagent ends on an API error, the error now has a readable message and technical details that hooks can access\n\n**Unclear.** It is not clear which hook event receives this error.\n\n**What**\n\nA subagent is a helper Claude started by the main session. When one stops because of an error from the API (the service Claude Code talks to), the error is now described in two parts:\n\n- `message`, written for the person\n\n- `details`, for Claude and support: error type, HTTP status, request ID and model\n\nHooks, commands that run automatically at set moments, are now allowed to see and change these two fields.\n\n**Why**\n\nHooks can react to why a subagent failed using structured information instead of plain text.\n\n- Area: Hooks\n- Tier: You'll notice\n- Useful: 3\/5\n- Signal: 2\/5\n- Scope: individual\n- Heads-up: no"}