Block when the admission check cannot run
Use when
An
existing
synchronous
PreToolUse
command
hook
is
a
required
gate
before
file
writes,
shell
operations,
or
other
side
effects.
A
missing
script,
crash,
or
timeout
must
not
silently
remove
that
prerequisite.
Action
Require
the
2.1.295
feature
or
a
reviewed
equivalent.
Add
"onFailure":
"block"
to
the
existing
command
handler;
retain
its
matcher,
reviewed
executable,
properly
quoted
paths,
and
bounded
timeout.
Keep
the
guard
synchronous.
Treat
infrastructure
failure
as
blocked
admission:
preserve
the
error
and
repair
its
cause,
rather
than
removing
the
gate
or
merely
extending
the
timeout.
Do
not
assume
older
clients
honor
the
field.
Acceptance check
In
a
separately
authorized
disposable
fixture,
request
a
harmless
marker-file
write
through
the
actual
guarded
tool.
Test
a
missing
hook
command,
exit 1
with
empty
stdout,
and
a
deliberate
timeout
separately.
Each
must
block
dispatch
and
leave
the
marker
absent.
Restore
the
healthy
guard
between
cases.
A healthy denial must still block; a healthy no-objection result must permit the marker when ordinary policy independently allows it. Retain version, loaded configuration, hook invocation/result, tool events, and filesystem evidence. Repeat the deployed headless or child path where applicable. Calling the script directly does not test harness enforcement.
Evidence
October 8’s official release explicitly adds blocking on startup failure, timeout, and unexpected exit for command and HTTP hooks. An older macOS report supplies exact configuration, exit-127 transcript fields, and a quoting repair. A separate report documents unreachable matcher rules, showing why configuration presence alone is insufficient.
Caveat
The retrieved reference still describes fail-open timeouts and omits this option; documentation and release are not yet aligned. No public implementation, regression output, or independent post-release canary was verified. These fixtures are proposed, not executed. Unregistered or unmatched hooks, faulty exit-zero decisions, and malformed responses need separate coverage. Async observers and post-action hooks cannot provide this admission boundary. Protect policy files; retain independent permissions, containment, and task acceptance. Nothing was installed, enabled, or evaluated.