Skip to content

60-Second Idle Notifications Not Triggering in Notification Hook #8320

@mithro

Description

@mithro

Environment:

  • OS: Ubuntu 24.04 LTS
  • Desktop: GNOME (Wayland session)
  • Terminal: gnome-terminal
  • Claude Code Session: XDG_SESSION_TYPE=wayland

Description:
According to the Claude Code hooks documentation, the Notification hook should trigger "when the prompt input has been idle for at least 60 seconds" with the message "Claude is waiting for your input". However, this idle notification is not appearing.

Expected Behavior:
After 60 seconds of no user input, Claude Code should:

  1. Send a notification hook with message "Claude is waiting for your input"
  2. Trigger the configured notification hook script
  3. Display a desktop notification to alert the user

Actual Behavior:

  • Permission notifications work perfectly ("Claude needs your permission to use Bash", etc.)
  • 60-second idle notifications never trigger, even after confirmed 60+ second wait periods
  • No notification hook calls are logged for idle timeouts

Configuration:
Notification hook properly configured in ~/.claude/settings.json:

{
  "hooks": {
    "Notification": [
      {
        "hooks": [
          {
            "type": "command", 
            "command": "/path/to/notify-hook.py"
          }
        ]
      }
    ]
  }
}

Testing Evidence:
Permission notifications work: Hook triggers correctly for tool permission requests
Idle notifications missing: No hook calls after 60+ second wait periods

Hook Log for Working Permission Notification:

2025-09-28 15:25:49,230 - INFO - Notification hook triggered
2025-09-28 15:25:49,230 - DEBUG - Received input: {
  "session_id": "ca66bfe3-4def-41a8-b6e5-f77136284186",
  "transcript_path": "/home/tim/.claude/projects/-home-tim-tmp/ca66bfe3-4def-41a8-b6e5-f77136284186.jsonl", 
  "cwd": "/home/tim/.claude",
  "hook_event_name": "Notification",
  "message": "Claude needs your permission to use Bash"
}

Reproduction Steps:

  1. Start Claude Code session in gnome-terminal on Ubuntu 24.04 Wayland
  2. Configure notification hook in settings.json
  3. Complete any Claude interaction (ensure Claude finishes response)
  4. Wait 60+ seconds without typing anything
  5. Observe: No notification appears, no hook calls logged

Additional Information:

  • Other notification types work perfectly
  • Hook script executes successfully when called
  • No errors in Claude Code logs
  • Desktop notification system is functional
  • Full implementation available at: https://github.com/mithro/claude-notify-gnome

Impact:
Users miss important "Claude is waiting" notifications, reducing effectiveness of notification-based workflow interruption and forcing manual status checks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:coreautocloseIssue will be closed automaticallybugSomething isn't workinghas reproHas detailed reproduction stepsplatform:linuxIssue specifically occurs on Linux

    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