Hooks — lifecycle events, deterministic enforcement
Hooks attach deterministic code to specific moments in the agent's lifecycle, so a rule enforces itself rather than relying on the model to remember it. Stud…
Hooks attach deterministic code to specific moments in the agent's lifecycle, so a rule enforces itself rather than relying on the model to remember it. Stud…
Hooks attach deterministic code to specific moments in the agent's lifecycle, so a
rule enforces itself rather than relying on the model to remember it. Students learn
the lifecycle events a hook can fire on — before a tool call (which can block it),
when a permission is requested (allow or deny), when a sub-agent starts, and so on —
and the governing principle: use a hook when you need a hard guarantee, not a polite
suggestion. Hooks are the deterministic counterweight to the model's
non-determinism.