claude-code - 💡(How to fix) Fix [Bug] Notification hooks not firing for permission_prompt in VS Code extension [1 comments, 2 participants]

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…
GitHub stats
anthropics/claude-code#51931Fetched 2026-04-23 07:41:05
View on GitHub
Comments
1
Participants
2
Timeline
6
Reactions
0
Timeline (top)
labeled ×4closed ×1commented ×1

Code Example

[]
RAW_BUFFERClick to expand / collapse

Bug Description Notification hook (permission_prompt) does not fire in the VS Code extension.

Environment:

  • macOS Darwin 25.3.0
  • Claude Code VS Code native extension
  • ~/.claude/settings.json has a Notification hook: afplay /System/Library/Sounds/Blow.aiff (async: true)

Repro:

  1. Ask Claude to run a command that requires approval (e.g. curl https://example.com)
  2. Approval prompt appears

Expected: Blow.aiff plays (same config works correctly in terminal Claude Code). Actual: No sound in VS Code extension. Hook does not seem to fire. afplay itself works. Identical settings.json works in the terminal CLI.

Request: Please fire Notification hooks on permission_prompt in the VS Code extension as well.

Environment Info

  • Platform: darwin
  • Terminal: Apple_Terminal
  • Version: 2.1.117
  • Feedback ID: 3f653a53-a48f-475a-9944-e7a61d607937

Errors

[]

extent analysis

TL;DR

The notification hook permission_prompt may not be firing in the VS Code extension due to differences in how the extension handles asynchronous commands compared to the terminal CLI.

Guidance

  • Verify that the async: true setting in ~/.claude/settings.json is correctly parsed and applied in the VS Code extension, as it works in the terminal CLI.
  • Check if there are any restrictions or limitations in the VS Code extension that prevent the execution of external commands like afplay with the async: true flag.
  • Test if the issue persists when using a different sound file or command in the notification hook to isolate if the problem is specific to afplay or the sound file.
  • Consider adding logging or debugging statements in the VS Code extension to see if the permission_prompt hook is being triggered but the command is not being executed as expected.

Example

No code snippet is provided as the issue seems to be related to configuration and environment rather than code.

Notes

The issue might be specific to the interaction between the VS Code extension and the macOS environment, given that the same configuration works in the terminal CLI. Further investigation into how the extension handles asynchronous commands and external processes may be necessary.

Recommendation

Apply workaround: Modify the ~/.claude/settings.json to use a different command or sound file to see if the issue is specific to afplay or the async: true setting, as this can help isolate the problem without requiring changes to the VS Code extension itself.

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