Artifact fe69cb582c79d217efd0077ebe9a28a5e4c290534afc057049a5189846488d55:
- File docs/reference/hook-events.md — part of check-in [d66dc3f8af] at 2026-11-21 11:05:58 on branch docs-reorg — docs: short README; manual, reference, dev, design and archive under docs/; AGENTS.md; docs.sh checks docs against code; changelog.inc built at build time (user: dmestas, size: 665) [annotate] [blame] [check-ins using] [more...]
Hook events
The Claude Code hook events pic fires. How hooks are configured and what their output does is in hooks.
| Event | When | Can block |
|---|---|---|
SessionStart |
a conversation opens; output becomes context | no |
UserPromptSubmit |
before a message is sent; output becomes context | yes |
PreToolUse |
before a tool call; permissionDecision or exit 2 denies it |
yes |
PostToolUse |
after a tool call; output becomes context | yes |
PreCompact |
before a compaction; output becomes context | no |
Stop |
when a reply ends with no tool calls | yes |
SessionEnd |
when a conversation closes | no |