Notification hook never fires in VS Code native panel (permission_prompt & idle_prompt)

Status Closed — duplicate
Reported on v2.1.220
Maintainer reply None cached
Activity 1 comment · opened Aug 3, 2026 · closed Aug 15, 2026

Summary

In the VS Code native panel (not the integrated terminal), the Notification hook is never dispatched — for either permission_prompt or idle_prompt. Other hook types (PreToolUse, PostToolUse, Stop) fire correctly in the same session, so the hook runner itself is healthy; the Notification event specifically never reaches hooks. This means there is no way to get an audible/visual alert when Claude needs input or approval while using the native panel.

Environment

  • OS: macOS (Darwin 25.5.0)
  • Claude Code: 2.1.220 (also reproduced on 2.1.150)
  • Surface: VS Code native extension panel (not the integrated terminal)
  • Notification hook configured in ~/.claude/settings.json running afplay + osascript display notification

Repro

  1. In ~/.claude/settings.json, add a Notification hook that runs a command with an observable side effect, e.g. append a timestamped line to a log file (so firing is verifiable independent of audio):

``json
"hooks": {
"Notification": [
{ "hooks": [
{ "type": "command", "command": "{ printf '%s ' \"$(date '+%FT%T')\"; cat; echo; } >> ~/notif-hook.log" },
{ "type": "command", "command": "afplay /System/Library/Sounds/Ping.aiff" }
] }
]
}
``

  1. Fully quit and reopen VS Code so settings load.
  2. Trigger a real permission prompt (a tool call requiring approval) → observe. Then finish a turn and leave the input idle → observe idle_prompt.

Expected

The Notification hook fires for permission_prompt and idle_prompt (as it does in the terminal CLI), running the configured commands.

Actual

Nothing runs — ~/notif-hook.log stays empty and no sound/banner appears, for both permission_prompt and idle_prompt. The hook commands themselves are confirmed working (they run fine when invoked directly, and macOS Notification permission / DND / volume are all fine).

Control / isolation

  • PreToolUse and PostToolUse hooks in the same settings.json fire correctly in the same session → hook runner is working.
  • A Stop hook (added as a workaround) also fires correctly and produces the sound/banner → confirms only the Notification event is affected.
  • Settings.json hot-reloads in this setup (the workaround took effect without a restart).

Impact / workaround

Users on the native panel get no alert when Claude needs input/approval. Workarounds: (a) use a Stop hook to approximate "your turn" alerts, or (b) run claude in the VS Code integrated terminal where Notification fires normally. Neither covers audible alerts on live permission prompts in the panel.

View original on GitHub ↗

This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗