Hooks: the instruction the agent cannot ignore
A rule in CLAUDE.md is followed most of the time, a hook is run by the harness every time. Events, exit 2, JSON output and matchers, three hooks tested with Claude Code (force push to main, em dash, a Stop hook that sends Claude back to work), and why a hook is not a sandbox.