Guardrails in Claude Code and AgentKit (1/2): the hook mechanism and config layers
Part 1/2: a prompt instruction is only a suggestion. A real guardrail is a hook in the Claude Code harness that blocks a tool call with exit 2. The hook mechanism, AgentKit's seven guardrail groups and its settings layers.
Series Guardrails in Claude Code and AgentKit · Part 1 of 2