VSCode native UI: Notification and PermissionRequest hooks do not fire
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
- Add debug hooks to
~/.claude/settings.jsonfor 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" }] }]
}
}
- Open Claude Code in VSCode native UI (not terminal mode)
- Have a conversation that triggers a permission prompt
- 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)
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗