claude-code - 💡(How to fix) Fix VS Code extension: Notification hooks don't fire on permission-approval or elicitation dialogs

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

Notification hooks do not fire when the extension shows a graphical permission-approval dialog, nor for AskUserQuestion / elicitation dialogs. The Stop hook fires reliably in the same setup — so hooks can run in the extension — but the dialogs that actually need the user's attention don't trigger any hook.

Root Cause

Notification hooks do not fire when the extension shows a graphical permission-approval dialog, nor for AskUserQuestion / elicitation dialogs. The Stop hook fires reliably in the same setup — so hooks can run in the extension — but the dialogs that actually need the user's attention don't trigger any hook.

Fix Action

Fix / Workaround

There's no scriptable/audible way to be alerted exactly when the extension is blocked waiting on the user (permission or question) — which is precisely when you'd want to be called back to the editor. Current workaround: end the turn and ask in plain text, so the working Stop hook carries the alert.

Code Example

"hooks": {
  "Stop":         [{ "hooks": [{ "type": "command", "command": "sh ~/.claude/bell.sh" }] }],
  "Notification": [{ "hooks": [{ "type": "command", "command": "sh ~/.claude/bell.sh" }] }]
}
RAW_BUFFERClick to expand / collapse

Environment

Claude Code VS Code native extension, Linux dev container (observed 2026-05-20).

Summary

Notification hooks do not fire when the extension shows a graphical permission-approval dialog, nor for AskUserQuestion / elicitation dialogs. The Stop hook fires reliably in the same setup — so hooks can run in the extension — but the dialogs that actually need the user's attention don't trigger any hook.

Repro

A Notification hook (matcherless) and a Stop hook, both running a script that writes the BEL byte (\a) to the integrated-terminal pty (audible via VS Code's terminal bell):

"hooks": {
  "Stop":         [{ "hooks": [{ "type": "command", "command": "sh ~/.claude/bell.sh" }] }],
  "Notification": [{ "hooks": [{ "type": "command", "command": "sh ~/.claude/bell.sh" }] }]
}
  1. End a turn → Stop hook fires (audible). ✅
  2. Trigger an approval-gated action (write / commit / push) → permission dialog appears → Notification hook does not fire. ❌
  3. Trigger an AskUserQuestionNotification hook does not fire. ❌

Also

preferredNotifChannel: terminal_bell produces no audible terminal bell on permission prompts in the extension's integrated terminal.

Impact

There's no scriptable/audible way to be alerted exactly when the extension is blocked waiting on the user (permission or question) — which is precisely when you'd want to be called back to the editor. Current workaround: end the turn and ask in plain text, so the working Stop hook carries the alert.

Expected

Notification hooks fire on permission-approval and elicitation dialogs in the VS Code extension (matching CLI behavior), and/or preferredNotifChannel: terminal_bell rings the integrated terminal on permission prompts.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING