VSCode extension permission prompts bypass the Notification hook
Description
When Claude Code runs inside the VSCode extension, permission-approval dialogs are shown via the extension's own graphical panel rather than the CLI's built-in terminal prompt. Confirmed via ps aux that the extension launches the CLI with --permission-prompt-tool stdio, routing decisions through a separate protocol from the plain CLI.
Impact
Hooks registered on Notification (e.g. matching the permission_prompt type) never fire for these dialogs when using the VSCode extension — only PreToolUse fires, but it fires for every tool call regardless of whether a dialog is actually shown, so it can't be used as a substitute for detecting real permission prompts.
Verification
- Confirmed the
Notificationhook fires correctly with the expected payload ("message": "Claude needs your permission to use Bash") when runningclaudedirectly in a terminal. - Confirmed via a temporary logging
PreToolUsehook that it fires on every tool call in the VSCode extension, both for auto-approved and dialog-requiring calls, with apermission_modefield reflecting the current mode (default,acceptEdits,auto, etc.) but no field indicating whether a UI dialog was actually shown. - Confirmed a real permission dialog in the VSCode extension produces no
Notificationhook invocation at all.
Workaround found
Setting claudeCode.useTerminal: true in VSCode's settings.json reverts Claude Code to CLI-style prompts inside the integrated terminal, which restores the Notification hook — at the cost of losing the extension's graphical diff/approval UI.
Request
Either:
- Have the VSCode extension also emit the
Notificationhook event (with thepermission_prompttype) when its own graphical permission panel is shown, so existing hook-based tooling (e.g. desktop notifiers) works uniformly across CLI and VSCode; or - Add a dedicated setting (e.g.
claudeCode.notifyOnPermissionPrompt) to trigger an OS-level desktop notification when the graphical panel requests approval, without requiringuseTerminal.
Environment
- Claude Code VSCode extension (native-binary,
anthropic.claude-code) - macOS
This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗