Answer: The SDK provides hooks for different stages of agent execution, including PreToolUse, PostToolUse, PostToolUseFailure, PostToolBatch, UserPromptSubmit, UserPromptExpansion, MessageDisplay, Stop, StopFailure, SubagentStart, SubagentStop, PreCompact, PostCompact, PreModelSwitch, PostModelSwitch, PermissionRequest, PermissionDenied, SessionStart, SessionEnd, Notification, Setup, TeammateIdle, TaskCreated, TaskCompleted, Elicitation, ElicitationResult, ConfigChange, InstructionsLoaded, WorktreeCreate, WorktreeRemove, CwdChanged, FileChanged, and DirectoryAdded. Some hooks are available in both SDKs, while others are TypeScript-only. Status: Confirmed Entry: tool/claude-code/agents-and-automation/available-hook-events Revision: 2 Digest: sha256:013d225735b27b46 (changes whenever the content changes) Timeline: Created: 2026-11-13T03:02:44Z Last changed: 2026-11-20T12:16:38Z (Stop: — → Stop) Last verified: 2026-11-20T12:16:38Z Next check: 2026-11-21T12:16:38Z Check interval: Daily Expected change: No fixed schedule Data: Field | Value | Source | As of PreToolUse | PreToolUse | [1] | 2026-11-20 PostToolUse | PostToolUse | [1] | 2026-11-20 PostToolUseFailure | PostToolUseFailure | [1] | 2026-11-20 PostToolBatch | PostToolBatch | [1] | 2026-11-20 UserPromptSubmit | UserPromptSubmit | [1] | 2026-11-20 UserPromptExpansion | UserPromptExpansion | [1] | 2026-11-20 MessageDisplay | MessageDisplay | [1] | 2026-11-20 Stop | Stop | [1] | 2026-11-20 Sources: [1] Anthropic. "Intercept and control agent behavior with hooks". https://code.claude.com/docs/en/agent-sdk/hooks.md Role: primary. Accessed: 2026-11-20T12:16:38Z Quote: "| `PreToolUse` | Yes | Yes | Tool call request (can block or modify) | Block dangerous shell commands |" (Supports: PreToolUse) Quote: "| `PostToolUse` | Yes | Yes | Tool execution result | Log file changes to an audit trail |" (Supports: PostToolUse) Quote: "| `PostToolUseFailure` | Yes | Yes | Tool execution failure | Handle or log tool errors |" (Supports: PostToolUseFailure) Quote: "| `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 |" (Supports: PostToolBatch) Quote: "| [`UserPromptSubmit`](https://code.claude.com/docs/en/hooks#userpromptsubmit) | Yes | Yes | A prompt is submitted, including a turn Claude Code starts on its own | Inject additional context into prompts |" (Supports: UserPromptSubmit) Quote: "| [`UserPromptExpansion`](https://code.claude.com/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 |" (Supports: UserPromptExpansion) Quote: "| `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 |" (Supports: MessageDisplay) Quote: "| `Stop` | Yes | Yes | Agent execution stop | Save session state before exit |" (Supports: Stop) Published: 2026-11-20T03:48:55Z Snapshot SHA-256: 0b2c9a218508ae08aa03a1d9bfe5916d39a56028c80699d2264a63c27a851f84 (captured 2026-11-20T12:16:38Z) Verification: Method: Automated extraction from [1] with deepseek-flash (JSON output, thinking disabled). Every value was checked by code to appear verbatim in a quoted passage of [1]. Cross-check: not-available at 2026-11-20T12:16:38Z. No independent second source is configured for this entry Last successful check: 2026-11-20T12:16:38Z Last attempt: 2026-11-20T12:16:38Z Notes and limitations: Extracted automatically from a single official source (section "Available hooks"). Related: https://latestn.com/tool/claude-code/agents-and-automation/build-bug-fixing-agent How do I build and run an agent with the Claude Code Agent SDK that finds and fixes bugs? https://latestn.com/tool/claude-code/agents-and-automation/call-model-from-mod How do I call a model from a Claude Code mod with the mods API? https://latestn.com/tool/claude-code/agents-and-automation/capture-session-id How do I capture the session ID in Claude Code SDK? https://latestn.com/tool/claude-code/agents-and-automation/append-to-claude-code-preset How do I append extra instructions to the claude_code preset system prompt in Claude Code? https://latestn.com/tool/claude-code/agents-and-automation/ask-claude-to-write-mod How do I ask Claude to write a Claude Code mod for me? https://latestn.com/tool/claude-code/agents-and-automation/auto-format-after-edits How do I make Claude Code auto-format code after it edits files using hooks? https://latestn.com/tool/ All entries in AI tools Change log: Time | Event | Change | Source 2026-11-20T12:16:38Z | changed | Stop: — → Stop | [1] 2026-11-20T12:16:38Z | changed | MessageDisplay: — → MessageDisplay | [1] 2026-11-20T12:16:38Z | changed | UserPromptExpansion: — → UserPromptExpansion | [1] 2026-11-20T12:16:38Z | changed | UserPromptSubmit: — → UserPromptSubmit | [1] 2026-11-20T12:16:38Z | changed | PostToolBatch: — → PostToolBatch | [1] 2026-11-20T12:16:38Z | changed | PostToolUseFailure: — → PostToolUseFailure | [1] 2026-11-20T12:16:38Z | changed | PostToolUse: — → PostToolUse | [1] 2026-11-20T12:16:38Z | changed | PreToolUse: — → PreToolUse | [1] 2026-11-20T12:16:38Z | changed | hook events: PreToolUse → — | [1] 2026-11-13T03:02:44Z | added | Entry created | — Changes for this entry as a feed: https://latestn.com/tool/claude-code/agents-and-automation/available-hook-events/latest Challenge this entry: Open challenges: None How: If a value here is wrong or out of date, send what is wrong and a link to evidence. Challenges are queued and checked against the evidence; they do not change the entry by themselves. If the entry changes as a result, the change log says so. Form: https://latestn.com/dispute/tool/claude-code/agents-and-automation/available-hook-events POST: https://latestn.com/dispute/tool/claude-code/agents-and-automation/available-hook-events with claim, evidence_url, and optionally field and contact (form-encoded or JSON) GET: https://latestn.com/dispute/tool/claude-code/agents-and-automation/available-hook-events?claim={what is wrong}&evidence_url={link} How to cite: LatestN. (2026). What hook events are available in Claude Code? Revision 2, last verified 2026-11-20T12:16:38Z. https://latestn.com/tool/claude-code/agents-and-automation/available-hook-events (accessed 2026-11-21T10:03:09Z). @misc{LatestN_tool_claude_code_agents_and_automation_available_hook_events_r2, title = {What hook events are available in Claude Code?}, author = {{LatestN}}, year = {2026}, howpublished = {\url{https://latestn.com/tool/claude-code/agents-and-automation/available-hook-events}}, note = {Revision 2; digest sha256:013d225735b27b46; last verified 2026-11-20T12:16:38Z; accessed 2026-11-21T10:03:09Z} } Reuse: License: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/) Attribution: Copying and adapting are allowed, including commercially, if you credit LatestN and link to the entry you used. Each entry ends with a ready-made citation. URL: https://latestn.com/tool/claude-code/agents-and-automation/available-hook-events