Hook
A hook is something that runs automatically on an event, whether or not the agent decides to.
It fires on things like before a command runs, after a file is edited, or when a session ends.
The difference from an instruction matters. An instruction asks the model to behave a certain way and it usually complies. A hook does not ask. If something must happen every time, it is a hook.
Was this page helpful?