Agent hook
Also called hook
Source: Claude Code hooks (opens in a new tab)User-defined action that a coding agent executes automatically at a specified point in its work, such as before or after a tool call.
In plain language
Arrange for an action to run when the agent reaches a chosen event.
In a sentence
- The developer added an agent hook that ran before a tool call.
- An agent hook checked the proposed operation before allowing the agent to continue.
Usage note
The entry concerns coding agent lifecycle events. The kinds of action and control available depend on the implementation.
Lifecycle control
Documentation explains how a product or system works. Cursor documents scripts that run before or after defined stages and can observe, block or modify behavior.
See also
- Valve
Pretool hook that refuses named irreversible commands in a Claude session, including force push flags, remote branch deletion, destructive SQL and credential rotation.
- AGENTS.md
Plain Markdown file at the root of a code repository that guides coding agents through sections explaining how to work on the project.
- Plan mode
Setting that directs a coding agent to explore a codebase and propose changes before implementing them.
- YOLO mode
Mode of running an AI agent with every action approved automatically, so its tool calls execute without asking the user for permission first.
Cite this term.
CC BY 4.0, attribution required.
Orbyt Labs, Agent hook (AI Glossary), Nov 14, 2026. https://
Orbyt Labs Glossaries (Nov 14, 2026), https://
Last updated .