blog /

Claude Code Waiting for Input Notifications That Work

Two signals look identical from the next room: a Claude Code waiting for input notification and a turn simply ending. The one-line difference is this: the Notification event fires when Claude is waiting on you, while the Stop event fires every time Claude finishes a turn, waiting or not. Hook the first and your desktop stays quiet until it matters. Hook the second and it buzzes all afternoon. This post sets up the first kind, matcher by matcher, and shows how to test each one.

How a Claude Code waiting for input notification fires

Claude Code exposes both events as hooks, configured in ~/.claude/settings.json for every project or .claude/settings.json for one project. The /hooks command lists whatever is configured, which is where every test below starts.

Notification is the waiting signal. It fires when something needs you and you have not typed: a permission prompt sitting unanswered, a finished turn going unread, a background session changing state. A hook on this event cannot block or change anything. Its only job is a side effect: flash, ring, or log.

Stop is the turn signal. It fires per turn, every time Claude finishes responding, including turns that end mid-task. It suits logging and review gates, not paging. A Stop hook that exits 2 even sends Claude back to keep working, so never put notification logic in one that can fail that way. Keep notifiers on Notification with exit 0.

PermissionRequest runs when a tool call needs a permission decision, before the six-second gate of permission_prompt. Hook it for the earliest signal, but keep its matcher narrow: it can answer the prompt for you, so a broad matcher auto-approves things you never meant to approve.

Why the wait happens

Every wait behind another window is one of four things, and each needs a different signal.

A permission prompt is the common one. Claude reached a gated tool call and paused for approval. The dialog sits open while you read email in the other window.

A finished turn with a question in plain text is the quiet one. Claude asked in prose and stopped, opening no dialog, so there is no prompt event. The closest signal is the turn ending plus your silence.

An idle session is the false one. Nothing is pending. Claude finished a while ago and you have not typed since. It looks like waiting, but nobody is waiting.

A background session changing state is the hidden one. Work you sent to the background now needs input or has finished, and its window is not even on screen.

Pick the event and matcher for each wait

The Notification matcher selects which waits page you. An empty matcher fires on every type, which is fine for logging and wrong for paging. These are the types that matter, from the hooks reference:

MatcherFires whenPage on it
permission_promptAn approval prompt waited about six secondsYes, this is the main one
idle_promptAbout 60 seconds after Claude finished and you have not typed, with no background agent still runningOnly if a quiet minute means something in your setup
agent_needs_inputA background session waits for input, only while agent view is openYes, if you work in agent view
agent_completedA background session finishes or fails, only while agent view is openYour call
auth_success, elicitation_*, quota_*Login, MCP dialogs, usage-limit resetsLog these, do not page on them

Three details change how you read this table. First, keystrokes defer the six-second gate: each keystroke defers the permission_prompt wait in terminal sessions, so answering fast means no event fires and logs undercount prompts during active pairing. Any typing suppresses idle_prompt, which fires only if you have not typed since Claude finished. Second, the two agent_* types stay silent unless agent view is open, so a background session can wait with no signal if you never open the view. Third, idle_prompt never fires during a usage-limit wait, and a plain-text question has no event of its own: the turn ends, you stay silent, and idle_prompt is the closest witness.

Set up the hook and the channel that carries it

Start from the paging hook in the hooks guide, narrowed to the prompt that matters. On macOS, in ~/.claude/settings.json:

{
  "hooks": {
    "Notification": [
      {
        "matcher": "permission_prompt",
        "hooks": [
          {
            "type": "command",
            "command": "osascript -e 'display notification \"Claude Code needs your attention\" with title \"Claude Code\"'"
          }
        ]
      }
    ]
  }
}

On Linux the same hook runs notify-send 'Claude Code' 'Claude Code needs your attention'. These examples parse nothing and decide nothing, so they need no jq and cannot approve anything by mistake. That is the complete Claude Code waiting for input notification for the common case: one matcher, one command, nothing to break. Hooks run alongside the built-in notification rather than replacing it.

Before trusting any pager, log the events for a day: add this object as a second entry in the same Notification array. It appends one line per notification with its type:

{
  "matcher": "",
  "hooks": [
    {
      "type": "command",
      "command": "jq -c '{time: now, type: .notification_type}' >> ~/.claude/notification-log.jsonl"
    }
  ]
}

The hook input carries notification_type, so the log shows exactly which matcher would have fired. After a day of real work, demote every type you would not have wanted to be woken for.

The channel matters as much as the hook. Claude Code sends its built-in desktop notification only in Ghostty, Kitty, and iTerm2; elsewhere, set preferredNotifChannel to terminal_bell or rely on the hook above (terminal configuration):

SetupWhat reaches you
Ghostty or KittyBuilt-in desktop note, forwarded over SSH with no setup
iTerm2Built-in desktop note after enabling Notification Center Alerts plus escape-sequence alerts
Other terminals, such as Warp or the VS Code integrated terminalTerminal bell through preferredNotifChannel, or a Notification hook
Inside tmuxNothing until set -g allow-passthrough on is in ~/.tmux.conf
Remote session over SSHThe built-in note still arrives locally; hook commands run remotely

Now the event test. First, type /hooks and confirm the new entry appears under Notification. Second, press Shift+Tab until the status bar shows manual mode on, ask Claude for something that needs permission, and stop typing: the desktop note should arrive after about six seconds, and the log should gain a permission_prompt line. Third, let any turn end and do not type for a full minute: the log should gain an idle_prompt line. If the permission test stays silent, the hook is misconfigured. If the idle test stays silent while a background agent runs, that is documented behavior, not a bug.

What can go wrong: pages you should not get and signals you will miss

Paging on Stop is the classic false positive. A long task produces dozens of turns and each one buzzes, until you stop looking at buzzes at all. Page on Notification, log Stop.

Paging on idle_prompt is the subtler one. It fires after any silent minute, including one you spent thinking with the terminal in front of you. Treat it as awareness, not urgency.

The desktop note itself has two platform traps. On macOS, osascript routes through the Script Editor app, which needs notification permission before anything appears: run osascript -e 'display notification "test"' once, find Script Editor under System Settings and Notifications, allow it, and test again. On Linux, notify-send needs a notification daemon, which headless servers, SSH sessions, and most containers lack, so test the command directly before blaming the hook.

On the missing side, remember the three silences: agent_* without agent view open, answers inside the six-second window, and plain-text questions with no event at all. If you lean on background sessions, keep the view open. If you pair fast, accept that the log undercounts. Prose questions leave only a turn end plus your silence, a separate detection problem covered in how to tell whether a coding agent is actually done. For sorting busy tabs from waiting ones, see how to know when a coding agent is waiting for input.

When a page deserves an answer now

Sort by reversibility, not by sender. A prompt to run the tests, read a file, or edit code inside the repo can be answered from anywhere, because every outcome is reviewable. Anything that publishes, deletes, spends, or touches production waits until you sit with the diff open. The ping tells you where to look; the looking is still the job, which is the point of why notifications do not eliminate babysitting.

Batch the small ones. Independent questions can queue until you take a break and answer in one pass. Questions that block each other point at a vague brief: the fix is clearer instructions next time, not faster thumbs this time.

Write repeats into config. Every permission prompt you approve twice is a rule missing from your allow list, and every clarifying question you answer twice is a convention missing from the project notes. The notification you configure twice should become a policy, and the question you answer twice should become a default.

Watching the wait without watching the window

Once the events page correctly, the remaining problem is seeing every waiting session at once. That is the screen qoop gives you: an agent that wants you shows as a blocked tab with an empty-ring mark, a quiet session reads as idle or done, an error as failed. The top row sorts the waiting first, and ctrl-a tab jumps to it.

You hear about it only when your focus sits elsewhere. The desktop note names the agent and what happened, a one-second recheck swallows flicker, and several agents landing together arrive as one note. The same ordering follows you to the phone, so a prompt can be answered from the next room.

When one of your agents goes quiet, qass opens that terminal's task record and plan file, and settles the routine prompts your earlier answers already cover. It clears one on its own only when the command shown is read-only, or inside the repo and reversible, and it never picks "always allow" on a permission menu. Anything that deletes, ships, spends, or leaves the machine becomes a card for you instead.

A Claude Code waiting for input notification earns its place by firing rarely: set the permission_prompt matcher, run both tests, and delete every page you would not cross the room for. If the waiting still owns your afternoon, sign up at https://qoop.si.