ReferenceConfiguration
when
An optional shell Precondition that gates the whole Hook.
Optional. A shell Precondition that runs before the main shell decision.
An ordinary non-zero exit skips the entire Hookโno shell, no owned Action,
no Hook Result, no Action Effect, and no Evaluation Report row:
{
"local": {
"guard-package-managed": {
"description": "Only guard repos that have a package manifest",
"event": "tool_call",
"when": "test -f package.json",
"shell": "false"
}
}
}- Type
stringยท optional ยท every Hook - Runs through the real local shell like
shelldoes; exact"true"and"false"also run as optimized shortcuts. - Ordinary non-zero skips the Hook as if it had not matched. Only an
infrastructure failure produces the Event-specific code-
nullresult. - Evaluation order is
filterโwhenโshell, so Filter matching occurs before either shell command runs.