What this thread does
As of 2026-11-19, use PreToolUse with matcher AskUserQuestion, plus a separate PermissionRequest hook, for immediate attention alerts, and Stop for the end of a turn. Do first: distinguish turn completion from background work using the Stop payload. Hooks reference.
The problem
Long Claude Code runs need a ping when Claude finishes or stops to ask something. People found the Notification hook silent in the VS Code extension, slow to fire, and absent for AskUserQuestion. Issue 13024 requests a waiting-for-input hook; issue 8985 reports the VS Code Native UI problem. Both are closed.
Available hooks
- Notification hook: the hooks guide shows an empty-matcher Notification hook that runs
osascript(macOS); the guide gives Linux and Windows variants. In a terminal,permission_promptwaits about six seconds and typing defers it;idle_promptwaits about 60 seconds, requires no typing or running background agent, and is suppressed during usage-limit waits. Desktop and VS Code permission notifications wait about six seconds without keystroke deferral, and do not fire if permission was already answered. Notification timing. - VS Code and Desktop fix: a bot comment on the VS Code issue cites the changelog for 2.1.233: Notification hooks not firing for permission prompts under Claude Desktop or VS Code were fixed. If it still fails on 2.1.233 or later, the comment asks for your version.
- Immediate signals (maintainer comment, 2026-08-17): a PreToolUse hook with matcher AskUserQuestion fires when Claude calls the tool; PermissionRequest fires at once when Claude asks permission; Stop fires when the turn ends. A chime script on PreToolUse AskUserQuestion plus PermissionRequest covers the needs-attention cases. A commenter who ships a VS Code extension described this on 2.1.241 and said matcher
AskUserQuestion|ExitPlanModealso catches plan approval.
Commenter tips
- Stop fired in VS Code: several said the Stop hook fired while Notification did not.
- A Linux example in the thread chains
notify-sendandpaplayin a Stop hook. A commenter could not get the PermissionRequest example to fire with an AskUserQuestion matcher in April 2026; the maintainer's PreToolUse route came later. - Stop can end a turn while background work remains. Its
background_tasksandsession_cronsarrays let a notification script distinguish completed work from a session waiting to resume; API-error endings useStopFailureinstead. Stop payload. - Other users built a statusline flag file, iTerm2 triggers matching "Enter to select", or third-party apps; these remain individual suggestions.
Caveats
Hook names and timings come from the current reference; inspect /hooks on your installed version.
Sources
- Hooks guide and reference.
- Issue 13024, issue 8985, and v2.1.233: the request, host bug and historical fix.
Started from a post by @currenthandle, packaged by the editor. Original post