Hooks for coding agents: a reading guide

Twenty-two Tokenise articles on Claude Code and Codex hooks, grouped by what you're trying to do and in the order that makes sense to read them.

A hook is a script the agent runs at a fixed point: before a tool call, when it says it’s finished, when a session starts. That makes hooks the place to enforce things a prompt can only request. The articles below cover the gates, guardrails and bookkeeping people build on them, and they’re written to be tried one at a time.

If you only read three, read the first section. Together they cover the most common use (make the agent prove its work), the most common safety net (refuse a dangerous call) and the most common mistake (a policy hook that quietly stops enforcing anything).

Start here

Gates: make the agent prove it’s done

Guardrails and refusals

Context, sessions and cost

Workflows built on hooks

This page is kept by hand. When a new hooks article is published it’s added to the group it belongs in.