Hooks can carry a permission-rule matcher so they only spawn for matching tool calls.
What's wrong with this entry?
A hook can now carry a matcher written in permission rule syntax, so it only fires when the tool call matches. Non-matching commands no longer spawn the hook process at all, which cuts startup cost on hooks that previously ran and immediately exited.
- The field is documented as permission rule syntax, the same form used for permission allow and deny rules.
- The stated benefit is avoiding hook spawns for commands the hook would ignore.
Only runs if the tool call matches the pattern. Avoids spawning hooks for non-matching commands.
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