hooks.md +2 −2
40| `UserPromptExpansion` | When a user-typed command expands into a prompt, before it reaches Claude. Can block the expansion |40| `UserPromptExpansion` | When a user-typed command expands into a prompt, before it reaches Claude. Can block the expansion |
41| `PreToolUse` | Before a tool call executes. Can block it |41| `PreToolUse` | Before a tool call executes. Can block it |
42| `PermissionRequest` | When a tool call needs a permission decision |42| `PermissionRequest` | When a tool call needs a permission decision |
4343| `PermissionDenied` | When a tool call is denied by the auto mode classifier. Return `{retry: true}` to tell the model it may retry the denied tool call || `PermissionDenied` | When a tool call is denied by the auto mode classifier. Use JSON `hookSpecificOutput.retry: true` to tell the model it may retry the denied tool call |
44| `PostToolUse` | After a tool call succeeds |44| `PostToolUse` | After a tool call succeeds |
45| `PostToolUseFailure` | After a tool call fails |45| `PostToolUseFailure` | After a tool call fails |
46| `PostToolBatch` | After a full batch of parallel tool calls resolves, before the next model call |46| `PostToolBatch` | After a full batch of parallel tool calls resolves, before the next model call |
51| `TaskCreated` | When a task is being created via `TaskCreate` |51| `TaskCreated` | When a task is being created via `TaskCreate` |
52| `TaskCompleted` | When a task is being marked as completed |52| `TaskCompleted` | When a task is being marked as completed |
53| `Stop` | When Claude finishes responding |53| `Stop` | When Claude finishes responding |
5454| `StopFailure` | When the turn ends due to an API error. Output and exit code are ignored || `StopFailure` | When the turn ends due to an API error |
55| `TeammateIdle` | When an [agent team](/docs/en/agent-teams) teammate is about to go idle |55| `TeammateIdle` | When an [agent team](/docs/en/agent-teams) teammate is about to go idle |
56| `InstructionsLoaded` | When a CLAUDE.md or `.claude/rules/*.md` file is loaded into context. Fires at session start and when files are lazily loaded during a session |56| `InstructionsLoaded` | When a CLAUDE.md or `.claude/rules/*.md` file is loaded into context. Fires at session start and when files are lazily loaded during a session |
57| `ConfigChange` | When a configuration file changes during a session |57| `ConfigChange` | When a configuration file changes during a session |