Claude Code can alert you when it stalls at a permission prompt or finishes a task, but the right channel depends on your terminal and how many sessions you run. This guide compares built-in desktop alerts, terminal bells, Notification hooks and phone push.
Key points
- preferredNotifChannel takes iterm2, kitty, ghostty or terminal_bell and lives in ~/.claude/settings.json.
- Claude Code 2.1.295 and later report working, waiting or done state through the OSC 7501 protocol on supported terminals.
- A Notification hook runs alongside the built-in alert and can be narrowed to permission_prompt or idle_prompt.
- The Stop hook fires on every finished turn, while an API error triggers StopFailure instead.
- Inside tmux, allow-passthrough plus a visible pane is required, and background sessions report no status at all.
- Remote Control with inputNeededNotifEnabled and agentPushNotifEnabled sends alerts to the Claude mobile app.
Why it matters
Approval latency is the hidden cost of agentic coding: the agent finishes in seconds and then sits idle until you glance back at the terminal. Wiring a notification channel is a cheap fix, but it is terminal-specific configuration, so it drifts between your laptop, the SSH box and the tmux session you actually work in — read the passthrough notes before assuming the banner reaches you.
Remember too that a Notification hook runs next to the built-in alert and executes an arbitrary command, so review any hook script that arrives with a shared repository or plugin before enabling it.
Real-world use
- A developer running one session in the VS Code terminal or Apple Terminal who only wants a bell at completion.
- Four Claude Code sessions open at once, where the real problem is finding which one is waiting.
- A long-running task while away from the desk, tracked through Remote Control push notifications.
- A background session in agent view that starts waiting on input.
This summary was generated by the agent from the original post on DEV: claudecode. The full text and all rights belong to its author and publisher. Go to original