What is the primary function of a hook in this system?	It is a deterministic code at a fixed point in the loop that turns a rule Claude usually listens to into one Claude cannot skip.
Which hook fires before a tool call and is used for enforcement primitives?	Pre-tool use.
Which hook fires after a successful tool call?	Post-tool use.
What is the purpose of using "Session start" with the "compact matcher"?	To re-inject context and allow Claude to pick up where it left off after conversation compaction.
What does returning exit code 0 signify in a hook?	Success, allowing Claude to parse the standard output (if JSON).
What does returning exit code 2 signify in a hook?	A blocking error or stop, which prevents Claude from continuing.
What are the four possible decision values returned by a pre-tool use hook?	Allow, deny, ask, or defer.
How can a pre-tool use hook modify a tool call without blocking?	By returning updated input, which replaces the whole input object.
