Notification hooks for permission_prompt should include tool details

Resolved 💬 6 comments Opened Mar 10, 2026 by ikstewa Closed May 26, 2026

Feature Request

When a Notification hook fires with notification_type: "permission_prompt", the hook input should include details about the pending tool approval — specifically:

  • Tool name (e.g. Bash, Write, Edit)
  • Tool arguments summary (e.g. the command string for Bash, the file path for Write/Edit)

Motivation

When using Claude Code in a terminal, macOS desktop notifications are helpful for knowing when Claude needs attention. However, the current Notification hook payload for permission_prompt only includes the notification type and a generic message — it doesn't say what is being requested.

This means you can show a notification like "Claude needs approval" but not "Claude wants to run git push origin master" or "Claude wants to edit src/main.ts". The latter would let users triage from the notification itself and decide whether to context-switch back to the terminal immediately or finish what they're doing.

Proposed Change

Add fields to the Notification hook input when notification_type is permission_prompt:

{
  "type": "notification",
  "notification_type": "permission_prompt",
  "message": "Claude needs your permission",
  "tool_name": "Bash",
  "tool_summary": "git push origin master"
}

tool_summary could be a short, best-effort string — the full command for Bash, the file path for file tools, etc. It doesn't need to include the entire tool input.

Use Case

{
  "hooks": {
    "Notification": [
      {
        "matcher": { "notification_type": "permission_prompt" },
        "hooks": [
          {
            "type": "command",
            "command": "osascript -e \"display notification \\\"$CLAUDE_TOOL_SUMMARY\\\" with title \\\"Claude Code: $CLAUDE_TOOL_NAME\\\"\""
          }
        ]
      }
    ]
  }
}

This would let users build rich macOS (or Linux) notifications that show exactly what Claude is waiting for.

View original on GitHub ↗

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