A bad hook response now shows the exact failing field, the output and a template.
What's wrong with this entry?
A 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.
- Union errors are walked to the most specific branch; the first problem prints as
path: messagewith remaining issues as a bulleted list. - A PermissionRequest decision gets the allow/deny shape appended; a legacy top-level
decisiongets an explanation of approve|block versushookSpecificOutput.permissionDecision. - A companion helper prints a field-by-field template of every accepted output type: PreToolUse, PermissionRequest, UserPromptSubmit, PostToolUse, PostToolBatch, Stop and SubagentStop.
- Failures are recorded per tool-use ID, capped at 8 entries, so the failing tool's name is prefixed in the status line.
- No gate found; appears to apply to all hooks.
Hook JSON output validation failed —
Strings lifted out of the shipped bundle, so the claim above can be checked against them.
Related
Other releases about the same thing. Found by shared names or similar wording; neither means one caused the other.
-
v2.1.234
SessionEnd hooks lose the
bypass_permissions_disabledreasonBoth mention hook
-
v2.1.236
Hooks and Ctrl-C go quiet once shutdown has started
Both mention hook
-
v2.1.236
Shutdown seals transcript writes and gives SessionEnd hooks more time
Both mention hook