Hooks
Hooks register lifecycle callbacks inside a session. The registration lifecycle
is registerHook(), hookCount(), and unregisterHook().
Events
Supported event types are:
Registration Example
A handler may return { action: 'continue' }, { action: 'skip' },
{ action: 'block', reason }, or null/undefined to continue. Validate the
specific event path you depend on before using a hook as a production gate.
Propagation
Delegation and automatic subagent fan-out use the task and parallel_task
tools. When a product depends on hook behavior across delegated runs, cover that
product path with an integration test.