claude-code - 💡(How to fix) Fix [BUG] Notification hook does not fire in VS Code/Cursor extension when Claude asks for user input [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#46718Fetched 2026-04-12 13:34:52
View on GitHub
Comments
1
Participants
2
Timeline
8
Reactions
0
Timeline (top)
labeled ×5closed ×1commented ×1unlabeled ×1

Error Message

Error Messages/Logs

Code Example



---

"Notification": [{
  "matcher": "",
  "hooks": [{
    "type": "command",
    "command": "bash -c 'echo \"$(date) HOOK=Notification\" >> /tmp/claude-hooks.log'"
  }]
}]
RAW_BUFFERClick to expand / collapse

Preflight Checklist

  • I have searched existing issues and this hasn't been reported yet
  • This is a single bug report (please file separate reports for different bugs)
  • I am using the latest version of Claude Code

What's Wrong?

The Notification hook fires correctly in the terminal CLI when Claude Code needs user input (e.g., asking a question, requesting tool permission), but it does not fire when running Claude Code through the VS Code/Cursor extension UI.

The Stop hook works correctly in both environments.

What Should Happen?

The Notification hook should fire in the extension UI the same way it does in the terminal CLI when Claude is waiting for user input.

Error Messages/Logs

Steps to Reproduce

Add a Notification hook to ~/.claude/settings.json that logs to a file:

"Notification": [{
  "matcher": "",
  "hooks": [{
    "type": "command",
    "command": "bash -c 'echo \"$(date) HOOK=Notification\" >> /tmp/claude-hooks.log'"
  }]
}]

Open Claude Code in the Cursor/VS Code extension Give it a task that causes it to ask for user input (e.g., a question or tool permission prompt) Check /tmp/claude-hooks.log — no entry is written

Claude Model

Opus

Is this a regression?

I don't know

Last Working Version

No response

Claude Code Version

2.1.100

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

Other

Additional Information

No response

extent analysis

TL;DR

The Notification hook may not be properly configured or supported in the VS Code/Cursor extension UI, causing it to not fire when Claude Code needs user input.

Guidance

  • Verify that the Notification hook is correctly defined in the ~/.claude/settings.json file and that the matcher field is not filtering out the events that should trigger the hook.
  • Check if there are any specific requirements or limitations for using the Notification hook in the VS Code/Cursor extension UI, as it may differ from the terminal CLI.
  • Test the Notification hook with a different type or command to see if the issue is specific to the current configuration.
  • Compare the behavior of the Stop hook and the Notification hook to identify any potential differences in their configuration or implementation.

Example

No code snippet is provided as the issue is more related to configuration and setup.

Notes

The issue may be specific to the Opus Claude Model or the Anthropic API platform, and further investigation is needed to determine the root cause.

Recommendation

Apply workaround: Try modifying the Notification hook configuration to use a different type or command to see if it resolves the issue, as the current configuration may not be compatible with the VS Code/Cursor extension UI.

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