Hooks for Claude Code, Codex and Cursor
Scripts the harness runs on agent events: before and after a tool, on start, on stop.
Nothing here yet: cards appear once a checked description is ready.
A hook is a command the harness itself runs on an agent event, not something the model decides to do. That makes hooks the place for anything that must happen every time: formatting after an edit, blocking a dangerous command, a notification when the agent stops.
In Claude Code hooks live in settings.json (user, project or local) under the hooks key: an event, a matcher on the tool name and a command. There are 33 events, including PreToolUse, PostToolUse, UserPromptSubmit, Stop and SessionStart. Exit code 2 blocks the action. Hooks from different levels are merged rather than overridden.
Codex reads hooks from hooks.json or [hooks] tables in config.toml, Cursor from .cursor/hooks.json, Gemini CLI from settings.json. Event names and formats differ everywhere, so a hook written for one agent needs rework before it runs in another. Details: Claude Code hooks.