Skip to content

Waiting

wiki-sync edited this page Oct 8, 2026 · 2 revisions

Waiting on you

Several Claude Code sessions across several terminals, and one of them is stuck on a permission prompt, a question, or the idle prompt after you hit Stop. The panels, claudectl waiting, the MCP waiting tool and an optional status-line segment show which ones need you, oldest wait first, and a click (or claudectl waiting focus NAME) raises that session's terminal.

What counts as waiting

Claude Code hooks write a small marker next to the live-session registry (~/.claude/sessions/<pid>.waiting.json):

Hook What it does
Notification mark - permission prompt, question, or idle, from the payload
Stop mark idle - the turn ended and the prompt is waiting on you. Stop does not clear the marker.
UserPromptSubmit clear - you just sent work
PreToolUse clear - the agent is working
PostToolUse clear - a tool you approved is done; the permission prompt is no longer waiting
SessionEnd clear - the session is gone

A marker counts only for the live session that wrote it - same pid and same session id - so a crash, or a pid the kernel later reuses for another session, cannot leave a ghost row. A re-mark for the same session and reason keeps the original time, so the age does not jump back to 0s when Claude Code's idle reminder fires a minute after Stop.

Opt-in. The PreToolUse / PostToolUse hooks start node on every tool call of every session, so only ./install.sh waiting merges them into ~/.claude/settings.json - no other target does. It also turns the section on in the installed panel(s): GNOME waiting-enabled, macOS waitingEnabled, both off by default (with it off, the session registry is not read). Other hooks you already have are left alone; ./install.sh --uninstall waiting removes ours and turns the section off.

Surfaces

  • GNOME / macOS - a count on the indicator when anything is waiting, and a Waiting on you section in the menu. Click a row to focus that session's terminal (claudectl waiting focus, using the same placement as claudectl session save: tmux, kitty, WezTerm, iTerm, Terminal.app).
  • claudectl waiting / claudectl waiting list [--json] / claudectl waiting focus NAME|PID
  • MCP waiting - the list as text plus structured rows
  • Status line - opt-in --segments=…,waiting prints wait N (silent at 0)

Install

./install.sh waiting      # the hooks, and the panel section on
./install.sh cli          # claudectl waiting (list / focus)
./install.sh statusline --segments=context,limits,tokens,ping,waiting

Manual hook command, if you wire ~/.claude/settings.json yourself:

node "/home/you/.claude/claude-usage-panel/claude-code/waiting-hook.js"

on Notification, UserPromptSubmit, PreToolUse, PostToolUse, Stop and SessionEnd. The hook reads the payload on stdin and never fails the session.

Clone this wiki locally