Automate actions with hooks changedhooks-guide
Nearest release: v2.1.319, published 3 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 6 Nov 2026 03:59 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 6 Nov 2026 04:07 UTC.
Upstream edited
Recorded here
Lines+4added
Lines−3removed
From line
173
where the diff opens
First seen
14 Aug 2026
this site's first read of the page
Recorded edits50to this page, all time
The whole hunk
from line 173, old and new numbered
/
from line 173
173173> >
174174> > If you run Claude Code inside WSL, `powershell.exe` must be available on your `PATH` through Windows interop.
175175
176The empty `matcher` fires on all notification types. To fire only on specific events, set it to one of these values:
176The empty `matcher` fires on all notification types. To fire only on specific events, set it to a notification type, such as one of these:
177177
178178| Matcher | Fires when |
179179| :- | :- |
from line 180
180180| `permission_prompt` | Claude needs you to approve a tool use or a sandboxed command's [network request](https://code.claude.com/docs/en/sandboxing.md#network-isolation), and the prompt has waited about six seconds |
181181| `idle_prompt` | Claude finished responding about 60 seconds ago and you haven't typed since |
182182| `auth_success` | Authentication completes |
183| `auth_storage_failure` | Your sign-in completes, but Claude Code can't save the new credentials to its [credential storage](https://code.claude.com/docs/en/authentication.md#credential-management). Fires in place of `auth_success` |
183184| `elicitation_dialog` | An MCP server opens an elicitation form and you haven't typed for about six seconds |
184185| `elicitation_url_dialog` | An MCP server asks you to open a browser URL and you haven't typed for about six seconds |
185186| `elicitation_complete` | An MCP server reports that a [URL-mode elicitation](https://code.claude.com/docs/en/hooks.md#elicitation-input) is complete |
from line 194
193194
194195Claude Code times `permission_prompt` differently in a terminal and in Claude Desktop, the VS Code extension, and other hosts that answer permission requests through the Agent SDK. See [when each notification type fires](https://code.claude.com/docs/en/hooks.md#notification) for both timings.
195196
196The `quota_auto_resume_fired`, `quota_auto_resume_stale`, and `quota_auto_resume_disabled` matchers require Claude Code v2.1.234 or later.
197The `quota_auto_resume_fired`, `quota_auto_resume_stale`, and `quota_auto_resume_disabled` matchers require Claude Code v2.1.234 or later. The `auth_storage_failure` matcher requires v2.1.288 or later.
197198
198199In terminal sessions, `permission_prompt` for a sandboxed command's network request requires Claude Code v2.1.246 or later.
199200
from line 685
684685| `SessionStart` | how the session started | `startup`, `resume`, `clear`, `compact`, `fork` |
685686| `Setup` | which CLI flag triggered setup | `init`, `maintenance` |
686687| `SessionEnd` | why the session ended | `clear`, `resume`, `logout`, `prompt_input_exit`, `other` |
687| `Notification` | notification type | `permission_prompt`, `idle_prompt`, `auth_success`, `elicitation_dialog`, `elicitation_url_dialog`, `elicitation_complete`, `elicitation_response`, `agent_needs_input`, `agent_completed`, `quota_auto_resume_fired`, `quota_auto_resume_stale`, `quota_auto_resume_disabled`, `plugin_notification` |
688| `Notification` | notification type | `permission_prompt`, `idle_prompt`, `auth_success`, `auth_storage_failure`, `elicitation_dialog`, `elicitation_url_dialog`, `elicitation_complete`, `elicitation_response`, `agent_needs_input`, `agent_completed`, `quota_auto_resume_fired`, `quota_auto_resume_stale`, `quota_auto_resume_disabled`, `plugin_notification` |
688689| `SubagentStart` | agent type | `general-purpose`, `Explore`, `Plan`, or custom agent names |
689690| `PreCompact`, `PostCompact` | what triggered compaction | `manual`, `auto` |
690691| `PreModelSwitch`, `PostModelSwitch` | canonical name of the model the session switches to, as described under [PreModelSwitch](https://code.claude.com/docs/en/hooks.md#premodelswitch) | `claude-opus-5`, `claude-opus-4-6\|claude-opus-5`, `.*opus.*` |
No line in this hunk matches that.