VSCode native UI: Notification and PermissionRequest hooks do not fire

Resolved 💬 3 comments Opened Mar 6, 2026 by sunYtokki Closed Mar 9, 2026

Description

When using Claude Code in the VSCode native UI (not terminal mode), several hook events never fire, even though they work correctly in the terminal CLI.

Events tested

| Event | Fires in VSCode native UI? |
|---|---|
| Stop | ✅ Yes |
| UserPromptSubmit | ✅ Yes |
| PreToolUse | ✅ Yes |
| PostToolUse | ❌ No |
| Notification (all matchers: idle_prompt, permission_prompt, elicitation_dialog) | ❌ No |
| PermissionRequest | ❌ No |

Steps to reproduce

  1. Add debug hooks to ~/.claude/settings.json for all event types:
{
  "hooks": {
    "Notification": [{ "matcher": "", "hooks": [{ "type": "command", "command": "echo \"$(date) Notification\" >> /tmp/claude-hook-debug.log" }] }],
    "PermissionRequest": [{ "matcher": "", "hooks": [{ "type": "command", "command": "echo \"$(date) PermissionRequest\" >> /tmp/claude-hook-debug.log" }] }],
    "Stop": [{ "matcher": "", "hooks": [{ "type": "command", "command": "echo \"$(date) Stop\" >> /tmp/claude-hook-debug.log" }] }],
    "PreToolUse": [{ "matcher": "", "hooks": [{ "type": "command", "command": "echo \"$(date) PreToolUse\" >> /tmp/claude-hook-debug.log" }] }],
    "PostToolUse": [{ "matcher": "", "hooks": [{ "type": "command", "command": "echo \"$(date) PostToolUse\" >> /tmp/claude-hook-debug.log" }] }],
    "UserPromptSubmit": [{ "matcher": "", "hooks": [{ "type": "command", "command": "echo \"$(date) UserPromptSubmit\" >> /tmp/claude-hook-debug.log" }] }]
  }
}
  1. Open Claude Code in VSCode native UI (not terminal mode)
  2. Have a conversation that triggers a permission prompt
  3. Check /tmp/claude-hook-debug.log

Expected behavior

All hook events should fire in the VSCode native UI, matching the behavior of the terminal CLI.

Actual behavior

Only Stop, UserPromptSubmit, and PreToolUse fire. Notification, PermissionRequest, and PostToolUse never fire.

Impact

This prevents users from setting up "done" notifications (idle_prompt), permission alerts, and post-tool-use automation when using the VSCode extension. The Notification hook with idle_prompt matcher is commonly used to alert users when Claude is waiting for input — this is the primary use case affected.

Environment

  • Claude Code VSCode extension v2.1.69
  • macOS (darwin-arm64)
  • VSCode native UI mode (not claudeCode.useTerminal)

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗