Bug: Plugin-installed Notification hook command is not executed

Resolved 💬 3 comments Opened Feb 10, 2026 by ryota-murakami Closed Feb 13, 2026

Bug: Plugin-installed Notification hook command is not executed

Symptom

When a plugin registers a Notification hook via hooks.json, the hook command is never executed after installation through the plugin marketplace. The same hook script works correctly when configured manually in ~/.claude/settings.json.

  • Manual installation (directly in settings.json): Hook fires on every Notification event
  • Plugin marketplace installation (via /plugin install): Hook never fires, no log output generated

This issue was previously reported as #9708 and marked as resolved, but the plugin marketplace installation path still does not work.

Expected behavior

When a conversation ends or Claude Code needs user attention, a macOS desktop notification should appear:

<img width="754" height="236" alt="Image" src="https://github.com/user-attachments/assets/7e4d4479-8e71-4ee4-9e47-24b645ccf279" />

"Claude Code - Claude is waiting for your input"

Reproduction steps

Reproduction repository: https://github.com/laststance/claude-code-marketplace

1. Install dependencies
brew install jq terminal-notifier
2. Add the marketplace
/plugin marketplace add https://github.com/laststance/claude-code-marketplace
3. Install the plugin
/plugin install mac-notification-hook@laststance
4. Verify installation

Confirm mac-notification-hook@laststance appears in ~/.claude/settings.json under enabledPlugins:

{
  "enabledPlugins": {
    "mac-notification-hook@laststance": true
  }
}

Also confirm the plugin cache exists:

ls ~/.claude/plugins/cache/laststance/mac-notification-hook/0.1.0/hooks/
# Expected: hooks.json  notification-hook.sh
5. Verify plugin hooks.json

The plugin's hooks.json at ~/.claude/plugins/cache/laststance/mac-notification-hook/0.1.0/hooks/hooks.json:

{
  "hooks": {
    "Notification": [
      {
        "hooks": [
          {
            "type": "command",
            "command": "${CLAUDE_PLUGIN_ROOT}/hooks/notification-hook.sh"
          }
        ]
      }
    ]
  }
}
6. Start a conversation
claude

Have a conversation and wait for a Notification event to fire (e.g., finish a task and switch away from the terminal).

7. Observe
  • Expected: macOS desktop notification appears, and a new log entry is written to ~/.claude/hooks/logs/notification-hook.log
  • Actual: No notification appears, no new log entry is generated. The hook command is never executed.

Workaround

Manually add the Notification hook to ~/.claude/settings.json:

{
  "hooks": {
    "Notification": [
      {
        "hooks": [
          {
            "type": "command",
            "command": "~/.claude/hooks/notification-hook.sh"
          }
        ]
      }
    ]
  }
}

And copy the script manually:

mkdir -p ~/.claude/hooks
cp ~/.claude/plugins/cache/laststance/mac-notification-hook/0.1.0/hooks/notification-hook.sh ~/.claude/hooks/
chmod +x ~/.claude/hooks/notification-hook.sh

This confirms the script itself works — only the plugin hook registration path is broken.

Environment

System:
  OS: macOS 26.2
  CPU: (16) arm64 Apple M4 Max
  Shell: 5.9 - /bin/zsh
Binaries:
  Node: 24.13.0
  npm: 11.9.0
  pnpm: 10.28.2

Claude Code: 2.1.38

Related issues

  • #9708 — Original report (closed as resolved by the reporter on 2025-12-24, but the plugin marketplace path was likely not tested)
  • #12151 — Plugin hook output not captured for UserPromptSubmit and SessionStart (still open, may share the same root cause in the plugin hook dispatch system)

View original on GitHub ↗

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