Follow Discord
Sweep 20 Nov 2026 · 19:55Z Build v2.1.330 547 read Stable v2.1.323 Latest v2.1.330 Next v2.1.330 Feeds RSS JSON llms.txt llms-full.txt Unofficial
One change · claude-code

Intercept and control agent behavior with hooks changedagent-sdk/hooks

Nearest release: v2.1.288, published 11 hours before upstream edited the page. Shown because the two are within 24 hours of each other. Nothing here says the release caused the edit.

Upstream edited this page at 3 Oct 2026 05:33 UTC, give or take a minute or two: the time comes from Anthropic’s own sitemap rather than from a commit. This site recorded the change at 3 Oct 2026 05:37 UTC.

Upstream edited
Recorded here
Lines+1added
Lines−1removed
From line 146 where the diff opens
First seen 14 Aug 2026 this site's first read of the page
Recorded edits29to this page, all time

The whole hunk

from line 146, old and new numbered
/
lines
from line 146
146146| `PostToolUse` | Yes | Yes | Tool execution result | Log all file changes to audit trail |
147147| `PostToolUseFailure` | Yes | Yes | Tool execution failure | Handle or log tool errors |
148148| `PostToolBatch` | No | Yes | A full batch of tool calls resolves, once per batch before the next model call | Inject conventions once for the whole batch |
149| `UserPromptSubmit` | Yes | Yes | User prompt submission | Inject additional context into prompts |
149| [`UserPromptSubmit`](/docs/en/hooks#userpromptsubmit) | Yes | Yes | A prompt is submitted, including a turn Claude Code starts on its own | Inject additional context into prompts |
150150| [`UserPromptExpansion`](/docs/en/hooks#userpromptexpansion) | No | Yes | A user-typed command, or an MCP prompt, expands into a prompt before it reaches Claude. Doesn't fire when Claude invokes a skill itself | Block a command from direct invocation or add context when a skill is typed |
151151| `MessageDisplay` | No | Yes | An assistant message with text completes, once per message with the full message text | Redact or reformat the displayed text without changing the transcript |
152152| `Stop` | Yes | Yes | Agent execution stop | Save session state before exit |
Feedback