VSCode extension permission prompts bypass the Notification hook

Status Fixed / completed
Maintainer reply None cached
Activity 1 comment · opened Jul 22, 2026 · closed Aug 20, 2026

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 Notification hook fires correctly with the expected payload ("message": "Claude needs your permission to use Bash") when running claude directly in a terminal.
  • Confirmed via a temporary logging PreToolUse hook that it fires on every tool call in the VSCode extension, both for auto-approved and dialog-requiring calls, with a permission_mode field 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 Notification hook 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:

  1. Have the VSCode extension also emit the Notification hook event (with the permission_prompt type) when its own graphical permission panel is shown, so existing hook-based tooling (e.g. desktop notifiers) works uniformly across CLI and VSCode; or
  2. Add a dedicated setting (e.g. claudeCode.notifyOnPermissionPrompt) to trigger an OS-level desktop notification when the graphical panel requests approval, without requiring useTerminal.

Environment

  • Claude Code VSCode extension (native-binary, anthropic.claude-code)
  • macOS

View original on GitHub ↗

This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗