What
A hook is a command you configure to run when something happens in Claude Code. A PreToolUse hook runs before a tool is used and can block it. Changes:
permissionDecisionReasonCodefrom aPreToolUsehook is now copied into the result Claude Code records.- Two kinds of event gained an optional
written_atfield. - A new attachment type,
projects_instructions, was added.
Why
Programs built on Claude Code with the SDK, and programs that handle hooks, get more detail about permission decisions and events.
Names in the bundlePreToolUse
The entry above is what we published on the day. These lines were added later, as Anthropic's own pages caught up, and they sit beside the original rather than replacing it.
Confirmed since
Anthropic's documentation has since written up PreToolUse, on Automate actions with hooks.
Agent hooks use the `"ok"` / `"reason"` response format and run for up to 50 tool-use turns. They don't support the prompt-hook `impossible` field. On `ok: false`, Claude Code handles an agent hook the way it handles a prompt hook with `co…hooks-guide see the edit
Two sources agreeTwo things we can check say the same as this entry.
Anthropic's documentation agrees
Anthropic's documentation has since written up PreToolUse, on Automate actions with hooks.
Anthropic's release notes agree
Fixed a crash or freeze when a mod drew a Code block in a row beside long text or another Code block