Hooks reference changedhooks
Nearest release: v2.1.304, published 6 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 20 Oct 2026 02:25 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 20 Oct 2026 02:37 UTC.
Upstream edited
Recorded here
Lines+1added
Lines−1removed
From line
1,465
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 1465, 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 1465
14651465
14661466`UserPromptSubmit` hooks don't fire only on prompts you type. Claude Code also runs them on:
14671467
1468* A [scheduled task](/docs/en/scheduled-tasks) firing, including a `/loop` iteration
1468* A [session-scoped scheduled task](/docs/en/scheduled-tasks) firing, including a `/loop` iteration
14691469* A [background subagent](/docs/en/sub-agents#run-subagents-in-foreground-or-background) reporting back to the session that started it
14701470* A [message another session sends](/docs/en/cross-session-messaging) to your main conversation
14711471
from line 4015
40154015
40164016Set `type` to `"agent"` and provide a `prompt` string, using `$ARGUMENTS` as a placeholder for the hook input JSON. The configuration fields are the same as [prompt hooks](#prompt-hook-configuration), except that agent hooks have a longer default timeout of 60 seconds and no `continueOnBlock` field.
40174017
4018The response schema is `{ "ok": true }` to allow or `{
4018The response schema is `{ "ok": true }`
No line in this hunk matches that.