hooks

Hooks & Lifecycle

Agent extensibility via lifecycle hooks — intercept, observe, and control agent behavior at key points in the workflow

12 features
Session lifecycle management Widely
Hooks for session start and end — initialize environment, load context, clean up resources, or log session activity
Generic tool use hooks Widely
Pre and post hooks around any tool execution — inspect, modify, block, or log tool calls
Control shell commands Widely
Dedicated hooks for intercepting shell/terminal command execution — block dangerous commands, audit, or inject env vars
Control file access Widely
Dedicated hooks for file read and write operations — enforce access policies, trigger linting, or audit file changes
Control MCP tool use Widely
Dedicated hooks for MCP server tool invocations — audit, restrict, or modify MCP tool calls independently from built-in tools
Observe compaction window Newly
Hooks that fire before and after context window compaction — preserve critical state, log what gets summarized, or block compaction
Permission request hook Limited
Runs when the agent is about to ask you to approve a tool call — approve or deny it automatically instead of showing the prompt
Subagent lifecycle Limited
Hooks for when subagents are spawned and when they complete — observe delegation, aggregate results, enforce policies
Validate prompts before submission Limited
Intercept user prompts before they reach the model — block, rewrite, redact, annotate, or inject context
Agent complete (stop) Limited
Hook that fires when the agent finishes a turn — implement quality gates, force continuation, or trigger follow-up workflows
Interrupt hook Limited
Runs when you interrupt the agent mid-turn (Esc or Ctrl-C) — clean up, log, or notify when a turn is cut short
Agent response tracking Limited
Observe and react to the agent's responses — log output, track thinking, or trigger side effects after each message
instructions

Instructions

How you tell the agent what to do and what it may do: guidance files, scoping, approvals, and cross-agent compatibility

7 features
mcp

Model Context Protocol

MCP client support — transports, server primitives, client features, and configuration

12 features
memory

Memory

How the agent persists its own knowledge and sessions, and manages the constraint of limited context

4 features
tools

Built-in Tools

Native tools and capabilities the agent ships with out of the box

17 features