[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
Workaround ✓ Mentioned in description ↑
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
- Configure a Notification hook in settings.json with a command that logs to a file
- Reload VSCode window
- Configure permissions.ask to require confirmation for specific tools (e.g., Bash)
- Execute a tool that triggers the permission dialog
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
Showing cached comments. Read the full discussion on GitHub ↗
12 Comments
Found 3 possible duplicate issues:
This issue will be automatically closed as a duplicate in 3 days.
🤖 Generated with Claude Code
Please keep this issue active with "me, too" to avoid auto-closure. All potential duplicates have been closed due to missing activity.
Potential solution:
https://github.com/anthropics/claude-code/issues/8985#issuecomment-3798023834
Any update?
+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.jsonwithhooks.Notification[]+hooks.Stop[]using the same hook configuration and command structure (PowerShellMedia.SoundPlayer? WAV):Stopfires reliably at every turn end.Notificationnever fires on permission prompts. (Other Notification scenarios such as idle reminders were not verified in isolation.)Repro
defaultModefromautoto "ask before permissions".cmd /c ver) ? permission prompt window appears correctly ? Allow ? tool runs.Diagnosis
Temporarily extended
Notificationcommand withAdd-Content -Path <logfile> -Value (Get-Date -Format o)beforePlaySync. Both parts verified in isolation: PowerShellSoundPlayerplays (PLAYED_OK),Add-Contentwrites the logfile. After an actual permission prompt with the modified hook: logfile stays empty, no sound.? The
Notificationhook does not appear to be invoked at all (not just silent).Given that:
Stop,Add-Contentare verified independently,this suggests the
Notificationevent is either not emitted or not wired to the hook pipeline in the VS Code extension. Not the Windows backslash-quoting issue (#54640), since theStophook with identical path syntax runs cleanly in the same process context.CLI mode not cross-tested. Related: #60870, #58909, #8985.
Closing for now — inactive for too long. Please open a new issue if this is still relevant.
Do not close. It is still relevant
I'm facing this issue as well. Thanks!
Still relevant. Please reopen
Still relevant. Please reopen
+1
This bug is still present.