{"version":"2.1.248","anchor":"hook-schema-failures-now-print-the-exact-field-a-template-an","canonical_anchor":"hook-schema-failures-now-print-the-exact-field-a-template-an","heading":"Hook schema failures now print the exact field, a template, and which tool failed","tier":"notice","area":"Hooks","scope":null,"heads_up":null,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.248\/e\/hook-schema-failures-now-print-the-exact-field-a-template-an","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.248","markdown":"### Hook schema failures now print the exact field, a template, and which tool failed\n\nA bad hook response now shows the exact failing field, the output and a template.\n\n**What**\n\nA hook whose JSON does not match the expected shape now gets a full diagnostic instead of a bare rejection: the specific failing field and message, the offending output, and targeted hints.\n\n**Details**\n\n- Union errors are walked to the most specific branch; the first problem prints as `path: message` with remaining issues as a bulleted list.\n- A PermissionRequest decision gets the allow\/deny shape appended; a legacy top-level `decision` gets an explanation of approve|block versus `hookSpecificOutput.permissionDecision`.\n- A companion helper prints a field-by-field template of every accepted output type: PreToolUse, PermissionRequest, UserPromptSubmit, PostToolUse, PostToolBatch, Stop and SubagentStop.\n- Failures are recorded per tool-use ID, capped at 8 entries, so the failing tool's name is prefixed in the status line.\n- No gate found; appears to apply to all hooks.\n\n**Evidence**\n\n`Hook JSON output validation failed \u2014 `\n\n- Area: Hooks\n- Tier: You'll notice\n- Useful: 4\/5\n- Signal: 2\/5"}