Agent Hooks Shell hooks let a user run their own script at fixed points in the agent's lifecycle — to block a dangerous action, rewrite an input or an outbound message, inject context into the model, or warn the user . The script can be written in any language; it talks to the agent over a simple JSON-on-stdin, JSON-on-stdout protocol. Tools: , , When to use Reach for hooks when the user wants the agent to automatically enforce a rule or react to an event without being asked each time. Examples: - "Stop me from running / destructive bash" → block - "Never let a private key get pushed to Teleg…