Hooks reference changedhooks
Nearest release: v2.1.234, published 6 hours before this site recorded the change. Shown because the two are within 24 hours of each other. Nothing here says the release caused the edit.
Recorded here
Lines+9added
Lines−9removed
From line
302
where the diff opens
First seen
14 Aug 2026
this site's first read of the page
Recorded edits112to this page, all time
The whole hunk
from line 302, old and new numbered
/
This page is larger than the 256 KiB this site keeps, so one side of the diff below stops where the stored text does.
from line 302
302302| `PreToolUse`, `PostToolUse`, `PostToolUseFailure`, `PermissionRequest`, `PermissionDenied` | tool name | `Bash`, `Edit\|Write`, `mcp__.*` |
303303| `SessionStart` | how the session started | `startup`, `resume`, `clear`, `compact`, `fork` |
304304| `Setup` | which CLI flag triggered setup | `init`, `maintenance` |
305| `SessionEnd` | why the session ended | `clear`, `resume`, `logout`, `prompt_input_exit`, `bypass_permissions_disabled`, `other` |
305| `SessionEnd` | why the session ended | `clear`, `resume`, `logout`, `prompt_input_exit`, `other` |
306306| `Notification` | notification type | `permission_prompt`, `idle_prompt`, `auth_success`, `elicitation_dialog`, `elicitation_url_dialog`, `elicitation_complete`, `elicitation_response`, `agent_needs_input`, `agent_completed` |
307307| `SubagentStart` | agent type | `general-purpose`, `Explore`, `Plan`, custom agent names, or plugin-scoped names like `^my-plugin:reviewer$` |
308308| `PreCompact`, `PostCompact` | what triggered compaction | `manual`, `auto` |
from line 2916
29162916
29172917The `reason` field in the hook input indicates why the session ended:
29182918
2919| Reason | Description |
2920| :---------------------------- | :----------------------------------------- |
2921| `clear` | Session cleared with `/clear` command |
2922| `resume` | Session switched via interactive `/resume` |
2923| `logout` | User logged out |
2924| `prompt_input_exit` | User exited while prompt input was visible |
2925| `bypass_permissions_disabled` | Bypass permissions mode was disabled |
2926| `other` | Other exit reasons |
2919| Reason | Description |
2920| :---------------------------- | :---------------------------------------------------------------------------------------- |
2921| `clear` | Session cleared with `/clear` command |
2922| `resume` | Session switched via interactive `/resume` |
2923| `logout` | User logged out |
2924| `prompt_input_exit` | User exited while prompt input was visible |
2925| `other` | Other exit reasons |
2926| `bypass_permissions_disabled` | Removed in v2.1.234; Claude Code doesn't send it. Drop it from your `SessionEnd` matchers |
29272927
29282928#### SessionEnd input
29292929
from line 3218
321832183. After up to 50 turns, the subagent returns a structured `{ "ok": true/false }` decision
321932194. Claude Code allows the action if `ok` is `true`. If `ok` is `false`, Claude Code handles the block the same way as a prompt hook with `continueOnBlock: true` on that event, as listed under [Response schema](#response-schema)
32203220
3221Agent hooks are useful when verification requires inspecting actual files or test output, not just evaluating the hook input data alone.
3222
3223### Agent hook configuration
3224
3225Set `type` to `"agent"` and provide a `prompt` string. The configuration fields are the same as [prompt hooks](#prompt-hook-configuration), except that agent hooks have a longer default timeout and no `continueOnBlock`
3221Agent hook
No line in this hunk matches that.