{"version":"2.1.288","anchor":"hook-output-schema-failures-now-reported-and-tracked-distinc","canonical_anchor":"hook-output-schema-failures-now-reported-and-tracked-distinc","heading":"Hooks that print badly formed JSON are recorded as a separate kind of failure","tier":"notice","area":"Hooks","scope":"individual","heads_up":false,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.288\/e\/hook-output-schema-failures-now-reported-and-tracked-distinc","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.288","markdown":"### Hooks that print badly formed JSON are recorded as a separate kind of failure\n\nA script hook whose JSON output is badly formed is now recorded as its own failure, and exit code 2 still blocks\n\n**Unclear.** It is not clear whether the message you see when a hook's output is badly formed changed.\n\n**What**\n\nHooks are scripts you configure to run automatically at set points in a session. A script hook can print JSON, a structured text format, to tell Claude Code what to do. When that JSON does not match the expected format, Claude Code now handles it like this:\n\n- If the hook exited with any code other than 2, the failure is recorded as invalid hook output instead of being raised as an error.\n\n- If the hook exited with code 2, the failure is marked as blocked and recorded separately.\n\nPreviously any such mismatch raised an error unless the exit code was 2.\n\n**Why**\n\nIf you write hooks, badly formed output is now tracked as its own kind of failure, and exiting with code 2 still blocks as before.\n\n- Area: Hooks\n- Tier: You'll notice\n- Useful: 1\/5\n- Signal: 1\/5\n- Scope: individual\n- Heads-up: no"}