What
Before Claude Code runs a tool (such as a shell command), it decides whether to allow it, ask you, or refuse. The record of that decision held decision, reason and rule. It now also has an optional hook field saying which hook made the decision. A hook is a piece of plugin or user code that runs at a set moment.
- Plugin hooks: a
tool.checkhook can now return ahookstring with its decision. A non-string value is rejected with the message "a reason, rule or hook that is not a string". - Filling the field:
hookcomes from the hook's own answer or is looked up from the decision'sdecisionReason.hookName, ignoringtool.check. - Nested commands: the rule lookup now searches inside nested
subcommandResults. Before, it checked only one level deep, so a compound command could miss the rule that decided it.
Why
Tools and SDK users reading these decisions can tell when a hook, and which one, allowed or blocked a tool. Compound commands now report their deciding rule more reliably.
Something disagreesSomething we can check disagrees with this entry, or the writer said they could not settle it.
The writer flagged doubt
How the hook name is used after it is accepted, and whether plugin hooks of this kind are on by default, is not clear.