TL;DR
exit 0 answers "did the evaluator run" , not "may this call proceed" . A gate that forwards the exit status is not a gate.
I generated seven stub evaluators covering the shapes a real policy CLI takes β allow, deny, no-rule-matched, deny-then-crash, crash-with-no-output, silence, and a binary that is not there β and ran all seven through two wrapper styles.
The naive wrapper failed open on three of them : deny-with-exit-0, no-rule-matched, and silent-with-exit-0. In all three the tool call went ahead and the log said the hook had run.
The fix is small: only an explicit allow allows, deny and error stay distinguishable, and "no verdict" never inherits the default.
The two values that get conflated
Every hook-based gate has two separate results coming back from the policy evaluator:
the decision β allow / deny / nothing matched
the process status β did the evaluator itself run to completion
The first lives in stdout (usually JSON). The second is the exit code.β¦