Customize
Hooks
A script or a check that runs at a moment you choose.
A hook runs when something happens in the agent: a file is edited, a command is about to run, a chat starts, or the agent stops. Use one to format, to block a risky command, or to add a note the agent should see.
Moments
- When a chat starts or ends
- Before or after a tool runs, including shell commands and connected tools
- Before a file is read, or after it is edited
- Before you send a prompt, and when the agent finishes
- When a project folder opens
Two kinds
A command hook runs a script on your machine. A prompt hook is a written check Tetrarch applies to the moment. Ask Tetrarch to add either one.
Where it lives
A project hook is checked in, so the team and any cloud run of that project use it. A personal hook applies on your machine. A plugin can install hooks too. Tetrarch reloads them when the file changes.
A useful first hook formats the file after each edit, or refuses a command you never want run, such as a write against production data.