hooks
Hooks & Lifecycle
Agent extensibility via lifecycle hooks — intercept, observe, and control agent behavior at key points in the workflow
Session lifecycle management
Hooks for session start and end — initialize environment, load context, clean up resources, or log session activity Generic tool use hooks
Pre and post hooks around any tool execution — inspect, modify, block, or log tool calls Subagent lifecycle
Hooks for when subagents are spawned and when they complete — observe delegation, aggregate results, enforce policies Control shell commands
Dedicated hooks for intercepting shell/terminal command execution — block dangerous commands, audit, or inject env vars Control file access
Dedicated hooks for file read and write operations — enforce access policies, trigger linting, or audit file changes Validate prompts before submission
Intercept user prompts before they reach the model — block, rewrite, redact, annotate, or inject context Control MCP tool use
Dedicated hooks for MCP server tool invocations — audit, restrict, or modify MCP tool calls independently from built-in tools Observe compaction window
Hooks that fire before and after context window compaction — preserve critical state, log what gets summarized, or block compaction Agent complete (stop)
Hook that fires when the agent finishes a turn — implement quality gates, force continuation, or trigger follow-up workflows Agent response tracking
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 — persistent guidance files, scoping, and cross-agent compatibility
Project-level instructions
Repo-specific guidance files checked into version control (e.g. CLAUDE.md, .cursorrules, copilot-instructions.md) User-level instructions
Global personal preferences that apply across all projects for the current user Org/managed instructions
Organization-wide instructions enforced via managed policy or team admin settings Path-scoped rules
Instructions that only apply when the agent works with files matching a glob pattern Instruction file imports
Instruction files can reference or import other files to compose guidance from multiple sources AGENTS.md compatibility
The agent reads the cross-agent AGENTS.md format used by multiple coding tools mcp
Model Context Protocol
MCP client support — transports, server primitives, client features, and configuration
stdio transport
Connect to MCP servers via local processes using stdin/stdout SSE transport
Connect to MCP servers via Server-Sent Events over HTTP Streamable HTTP transport
Connect to MCP servers via the newer streamable HTTP transport Tool discovery & execution
Discover and invoke tools exposed by MCP servers Resource support
Read structured data and context exposed by MCP servers as resources Prompt template support
Use templated messages and workflows provided by MCP servers Sampling
Allow MCP servers to request LLM completions through the client Roots support
Expose filesystem or URI boundaries to MCP servers Elicitation
Allow MCP servers to request additional input from the user mid-operation OAuth authentication
OAuth 2.0 authentication for connecting to remote MCP servers Project-level MCP config
Configure MCP servers per-project, shareable via version control User-level MCP config
Configure MCP servers globally for the current user across all projects memory
Memory
How the agent persists its own knowledge and manages the constraint of limited context
Persistent auto memory
The agent automatically saves notes and learnings across sessions without manual effort Conversation resume
Resume a past conversation with its full context intact Context compaction
Gracefully handles long conversations by summarizing or compacting context when approaching window limits tools
Built-in Tools
Native tools and capabilities the agent ships with out of the box
File read
Read file contents from the local filesystem File edit / write
Create, modify, and overwrite files Notebook editing
Read and edit Jupyter notebook (.ipynb) cells Code search
Search file contents by pattern, regex, or filename glob Shell execution
Execute shell commands in the user's environment Background monitor
Run a process in the background and react to its output (tail logs, poll status) Scheduled tasks
Schedule recurring or one-shot prompts within a session (cron-like) Web search
Search the web for information Web fetch
Fetch and read the contents of a URL Image input
Read and understand images and screenshots (multimodal input) Image generation
Generate images from text descriptions Browser control
Programmatic browser interaction: take screenshots, navigate pages, click elements LSP integration
Language server features: go-to-definition, find references, type errors, symbol search Semantic search
Search codebase by meaning using embeddings or indexing, not just exact matches Subagent spawning
Spawn sub-agents with their own context window to handle tasks in parallel Task management
Track work progress with task lists and checklists within a session