What
Hooks are commands or prompts you configure to run automatically at certain moments, such as before a tool runs. Two new hook types are being added:
- An
agenthook type, with the fieldsprompt,if,timeout,model,status_messageandonce. - An
mcp_toolhook type, which calls a tool on an MCP server (an add-on that supplies tools), withserver,tool,input,if,timeout,status_messageandonce. - Hooks of these types are only accepted when a list fetched from Anthropic's remote settings,
tengu_woven_ladder, contains "agent" or "mcp_tool". The list defaults to empty, and with it empty these hooks are treated as an unknown kind, as before. Nothing has been read about this list yet. mcp_toolhooks are kept in a separate "not connected" group, their number is capped, and their server name must match a pattern. A pattern for plugin-qualified names (plugin:<name>:...) is also added.- A new error says
mcp_toolhooks are not available for a hook event that has no MCP connection behind it, naming the event.
Before, only prompt and command hooks were read.
Why
Once enabled, hooks could start a subagent or call an MCP tool directly. If you configure an mcp_tool hook on an event that does not support it, you now get an explicit error.