Hooks
Scripts the harness runs automatically at fixed points, such as before a tool call or after an edit.
A hook can format a file after every edit, block a dangerous command, or run tests before the agent stops. Unlike instructions in a prompt, a hook always runs, so it turns a preference into a guarantee.
Related terms
- AGENTS.md and CLAUDE.md: Files in a repository with the rules a coding agent reads at the start of every session.
- Guardrails: Checks around a model that block, fix or flag inputs and outputs that break the rules.
- Coding agent: An agent that reads a repository, edits files, runs commands and tests, and opens pull requests.
