[BUG] Notification hooks not firing for permission_prompt in VS Code extension

Status Closed — not planned
Reported on v2.1.123
Maintainer reply None cached
Activity 16 comments · opened May 3, 2026 · closed Jun 30, 2026

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet
  • [x] This is a single bug report (please file separate reports for different bugs)
  • [x] I am using the latest version of Claude Code

What's Wrong?

The Notification hook does not fire in the VSCode extension version of Claude Code.

Actual Behavior

  • Permission dialog is displayed as expected
  • However, the Notification hook does not fire
  • No log file is created by the hook command
  • PreToolUse and Stop hooks work correctly

What Should Happen?

Expected Behavior

According to the documentation (https://code.claude.com/docs/ja/hooks#notification), the Notification hook should fire in the following cases:

  • When Claude Code requests permission to use a tool
  • When the prompt input has been idle for at least 60 seconds

Error Messages/Logs

None

Steps to Reproduce

  1. Configure a Notification hook in settings.json with a command that logs to a file
  2. Reload VSCode window
  3. Configure permissions.ask to require confirmation for specific tools (e.g., Bash)
  4. Execute a tool that triggers the permission dialog

sample_settings.json

Claude Model

Opus

Is this a regression?

I don't know

Last Working Version

_No response_

Claude Code Version

2.1.123

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

Terminal.app (macOS)

Additional Information

  • When the permission dialog was displayed, the Notification hook did not execute
  • The log file specified in the command was never created
  • Other hooks (PreToolUse, Stop) work as expected
  • Workaround: Using PreToolUse hook with matcher "Write|Edit|Bash|NotebookEdit" to achieve similar functionality
  • Unclear if this issue exists in the CLI version
  • This may be specific to the VSCode extension

View original on GitHub ↗

12 Comments

github-actions[bot] · 3 months ago

Found 3 possible duplicate issues:

  1. https://github.com/anthropics/claude-code/issues/51931
  2. https://github.com/anthropics/claude-code/issues/28774
  3. https://github.com/anthropics/claude-code/issues/16114

This issue will be automatically closed as a duplicate in 3 days.

  • If your issue is a duplicate, please close it and 👍 the existing issue instead
  • To prevent auto-closure, add a comment or 👎 this comment

🤖 Generated with Claude Code

Maschina · 3 months ago

Please keep this issue active with "me, too" to avoid auto-closure. All potential duplicates have been closed due to missing activity.

Maschina · 3 months ago

Any update?

Weborganizing · 3 months ago

+1 - reproduced on VS Code extension anthropic.claude-code-2.1.153-win32-x64, Windows 11 Pro 10.0.26200, Claude Opus 4.7.

Setup
~/.claude/settings.json with hooks.Notification[] + hooks.Stop[] using the same hook configuration and command structure (PowerShell Media.SoundPlayer ? WAV):

"Notification": [{ "hooks": [{ "type": "command",
  "command": "powershell -NoProfile -c \"(New-Object Media.SoundPlayer 'C:\\Windows\\Media\\Windows Foreground.wav').PlaySync()\"" }]}],
"Stop":         [{ "hooks": [{ "type": "command",
  "command": "powershell -NoProfile -c \"(New-Object Media.SoundPlayer 'C:\\Windows\\Media\\tada.wav').PlaySync()\"" }]}]

Stop fires reliably at every turn end. Notification never fires on permission prompts. (Other Notification scenarios such as idle reminders were not verified in isolation.)

Repro

  1. Switched defaultMode from auto to "ask before permissions".
  2. Invoked Bash tool with non-allowed command (cmd /c ver) ? permission prompt window appears correctly ? Allow ? tool runs.

Diagnosis
Temporarily extended Notification command with Add-Content -Path <logfile> -Value (Get-Date -Format o) before PlaySync. Both parts verified in isolation: PowerShell SoundPlayer plays (PLAYED_OK), Add-Content writes the logfile. After an actual permission prompt with the modified hook: logfile stays empty, no sound.

? The Notification hook does not appear to be invoked at all (not just silent).

Given that:

  • the same command works under Stop,
  • PowerShell execution and Add-Content are verified independently,
  • no logfile entry is produced during permission prompts,

this suggests the Notification event is either not emitted or not wired to the hook pipeline in the VS Code extension. Not the Windows backslash-quoting issue (#54640), since the Stop hook with identical path syntax runs cleanly in the same process context.

CLI mode not cross-tested. Related: #60870, #58909, #8985.

github-actions[bot] · 2 months ago

Closing for now — inactive for too long. Please open a new issue if this is still relevant.

Maschina · 2 months ago

Do not close. It is still relevant

Harsh-Probably-Codes · 1 month ago

I'm facing this issue as well. Thanks!

Maschina · 1 month ago

Still relevant. Please reopen

6DiegoDiego9 · 1 month ago

Still relevant. Please reopen

valkirilov · 1 month ago

+1

dfinlay · 1 month ago

This bug is still present.

Showing cached comments. Read the full discussion on GitHub ↗