AI Glossary

Agent hook

noun phraseCoding agent automationpreferred in this glossary

User-defined action that a coding agent executes automatically at a specified point in its work, such as before or after a tool call.

Source: Claude Code hooks (opens in a new tab) (adapted)

Adapted: uses action to cover the reference's commands, endpoints, tool calls, prompts and subagents, and includes its tool-call events. Source: Claude Code hooks (opens in a new tab)

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.

Examples written for this glossary

Usage note

The entry concerns coding agent lifecycle events. The kinds of action and control available depend on the implementation.

  • Lifecycle control

    Documentation

    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.

    Source: Cursor hooks (opens in a new tab)

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.

This term

Orbyt Labs, Agent hook (AI Glossary), Nov 14, 2026. https://www.orbytlabs.ai/orbyt-collective/glossary/agent-hook

The dataset (JSON)

Orbyt Labs Glossaries (Nov 14, 2026), https://www.orbytlabs.ai/glossary#dataset

Last updated .