Skip to content

[BUG] Notification hook does not fire in VSCode extension #11156

@yoshiki0630

Description

@yoshiki0630

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 does not fire in the VSCode extension version of Claude Code.

Actual Behavior

  • Permission dialog is displayed as expected
  • However, the Notification hook does not fire
  • No log file is created by the hook command
  • PreToolUse and Stop hooks work correctly

What Should Happen?

Expected Behavior

According to the documentation (https://code.claude.com/docs/ja/hooks#notification), the Notification hook should fire in the following cases:

  • When Claude Code requests permission to use a tool
  • When the prompt input has been idle for at least 60 seconds

Error Messages/Logs

None

Steps to Reproduce

Steps to Reproduce

  1. Configure a Notification hook in settings.json with a command that logs to a file
  2. Reload VSCode window
  3. Configure permissions.ask to require confirmation for specific tools (e.g., Bash)
  4. Execute a tool that triggers the permission dialog

sample_settings.json

Claude Model

Sonnet (default)

Is this a regression?

I don't know

Last Working Version

No response

Claude Code Version

2.0.35 (Claude Code)

Platform

Anthropic API

Operating System

Windows

Terminal/Shell

Windows Terminal

Additional Information

  • When the permission dialog was displayed, the Notification hook did not execute
  • The log file specified in the command was never created
  • Other hooks (PreToolUse, Stop) work as expected
  • Workaround: Using PreToolUse hook with matcher "Write|Edit|Bash|NotebookEdit" to achieve similar functionality
  • Unclear if this issue exists in the CLI version
  • This may be specific to the VSCode extension

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:corearea:idebugSomething isn't workinghas reproHas detailed reproduction stepsplatform:windowsIssue specifically occurs on Windows

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions