Get notified when Claude Code needs approval or finishes
Claude Code sends a notification when it finishes a task or stops at a permission prompt while you seem to be away.
You can show it as a desktop notification, a terminal bell, a push notification on your phone, or anything a Notification hook can run. Which one you need depends on your terminal and on how many sessions you run.
Desktop notifications
In Ghostty, Kitty and iTerm2, Claude Code sends a desktop notification by default when it detects them, though iTerm2 shows it only after you turn on its alert settings.
In iTerm2, open Settings > Profiles > Terminal, check Notification Center Alerts, then click Filter Alerts and enable Send escape sequence-generated alerts. Also confirm that your terminal application has notification permission in your OS settings.
Over SSH from a terminal running outside tmux, set preferredNotifChannel to "iterm2", "kitty" or "ghostty" on the machine running Claude Code so the desktop notification reaches your local machine.
In the Claude desktop app, the Code tab sends its own desktop notification when a session finishes a task while you're not viewing it. A session you start from Dispatch on your phone sends a push notification there when it finishes or needs your approval. For Code tab sessions that belong to a project in the Claude Desktop app, you get the project's notifications instead.
If your terminal implements the OSC 7501 Program Status Protocol, Claude Code 2.1.295 or later also reports whether each interactive session is working, waiting on you or done, with nothing to turn on. Your terminal's documentation says whether it supports the protocol and where it shows the status.
Inside tmux, Claude Code checks tmux for OSC 7501 support instead of your terminal, and allow-passthrough has no effect on that, so start the session outside tmux. Background sessions do not report status to your terminal, and setting CLAUDE_CODE_DISABLE_TERMINAL_TITLE=1 stops Claude Code from checking for support or reporting status.
The terminal bell
Other terminals, such as Apple Terminal, Warp or the VS Code terminal, don't get the desktop notification. Ask for a bell instead. Add this to ~/.claude/settings.json:
{ "preferredNotifChannel" : "terminal_bell" }
In Apple Terminal, Claude Code sends no sound by default: it sends a silent bell character when Audible bell is off in the front Terminal window's profile, and nothing otherwise. That bell character shows as a window flash, or a Dock bounce while Terminal is in the background, if that profile's Visual bell or Dock bounce option is on.
Accepting Claude Code's first-run terminal setup prompt runs /terminal-setup, which turns off the audible bell in your Apple Terminal profile unless screen reader mode is active. To hear the bell in Apple Terminal, set preferredNotifChannel to "terminal_bell" and turn on Audible bell under Settings > Profiles > Advanced.
If you use tmux, add set -g allow-passthrough on to ~/.tmux.conf so the notification reaches the outer terminal. Run tmux source-file ~/.tmux.conf to apply the change to the running server, and set preferredNotifChannel to "iterm2", "kitty" or "ghostty" to send notifications from a visible pane to the outer terminal. A pane in a window you aren't viewing sends none.
If your sessions run inside Windows Subsystem for Linux, see Claude Code WSL notifications: get alerts on Windows for Windows Terminal bell settings and PowerShell hooks.
A Notification hook
A Notification hook runs a custom command when Claude needs your attention, such as playing a sound or sending a desktop notification. It runs alongside the built-in notification rather than replacing it.
On macOS, this plays a system sound:
{ "hooks" : { "Notification" : [ { "hooks" : [ { "type" : "command" , "command" : "afplay /System/Library/Sounds/Glass.aiff" } ] } ] } }
Claude Code fires the same hook events wherever it runs: in the terminal, IDE extensions, the Desktop app and cloud sessions.
To send a desktop banner instead, use your platform's notification command in a Notification hook in ~/.claude/settings.json:
- On macOS, run
osascript -e 'display notification "Claude Code needs your attention" with title "Claude Code"'in the hook command. - On macOS,
osascriptroutes notifications through Script Editor, which needs notification permission. To grant it, runosascript -e 'display notification "test"'once in Terminal, then turn onAllow Notificationsfor Script Editor inSystem Settings > Notifications. - On Linux, run
notify-send 'Claude Code' 'Claude Code needs your attention'in the hook command. - On Linux,
notify-sendneeds a desktop notification daemon. Ifnotify-sendisn't found on Debian or Ubuntu, install thelibnotify-binpackage. - On Windows, run
powershell.exe -Command "[System.Reflection.Assembly]::LoadWithPartialName('System.Windows.Forms'); [System.Windows.Forms.MessageBox]::Show('Claude Code needs your attention', 'Claude Code')"in the hook command. - The Windows command opens a dialog box rather than a corner notification, so the dialog can open behind your terminal window.
The Notification event fires on every notification type when matcher is empty, or you can filter it to specific types such as permission_prompt or idle_prompt. A separate Stop hook fires whenever Claude finishes responding, not only at task completion, while a PermissionRequest hook fires when a tool call needs a permission decision. See Know when Claude Code asks you a question or wants a plan approved for question and plan approval hooks.
Hook event or Notification matcher / When it fires:
permission_prompt( Notification ) / Claude needs approval for a tool use or a sandboxed command's network request, and the prompt has waited about six secondsidle_prompt( Notification ) / Claude finished responding about 60 seconds ago and you haven't typed sinceelicitation_dialog( Notification ) / An MCP server opens an elicitation form and you haven't typed for about six secondselicitation_url_dialog( Notification ) / An MCP server asks you to open a browser URL and you haven't typed for about six secondsagent_needs_input( Notification ) / A background session starts waiting on your input while agent view is openagent_completed( Notification ) / A background session finishes or fails while agent view is openStop(hook event, no matcher) / Claude finishes responding. It doesn't fire on a user interrupt, and an API error firesStopFailureinsteadPermissionRequest(hook event) / A tool call needs a permission decision
If you run background sessions, agent view also notifies you while it's open when one of them starts waiting on your input, finishes or fails. It fires the Notification hook with the agent_needs_input or agent_completed type, so a hook script can react to those too. See Claude Code agent view: run and watch background sessions for how to start background sessions and reply to them.
To see how Notification fits alongside PreToolUse, PostToolUse, Stop and the other hook events, read Claude Code hooks: events, matchers, settings and handlers.
Mobile push notifications with Remote Control and Dispatch
The Claude app for iOS and Android can receive push notifications for sessions running on your computer:
- Start Remote Control on your computer with
claude remote-control, or run/remote-controlinside an open session. - In the Claude Desktop app, you can also turn on
Connect new sessions to Remote ControlinSettings > CodeorSettings > Claude Code. - The
remoteControlAtStartupsetting connects Remote Control automatically when a session starts.
While Remote Control is active, Claude can send push notifications to your phone when a long-running task finishes or when it needs a decision from you. You can also ask for a notification in your prompt, such as notify me when the tests finish.
The inputNeededNotifEnabled setting gets you a push notification when Claude is waiting on you. The agentPushNotifEnabled setting lets Claude send a push notification to your phone when it decides to.
Dispatch sends its own push notification when a Code session it spawned finishes or needs your approval. Dispatch requires a Pro, Max or Ultra plan.
Which one to use
- You run / Use
- One session, Ghostty, Kitty or iTerm2 / Built-in desktop notifications
- One session, another terminal / terminal_bell
- You want a sound or a custom action / A Notification hook
- You're away from your computer / Remote Control push notifications
- Several sessions at once / A display that shows which session is waiting
When notifications aren't enough
A notification says that a session needs you. With four sessions open, you still have to find which one, and once you dismiss the banner it's gone. For a wider comparison of tmux, hooks, agent view, IDE panels and status pads, see How to monitor multiple Claude Code sessions.
I built Orbtile for this: it shows every session as its own tile on an iPhone, an Android phone or the Logitech MX Creative Keypad. A waiting session glows in its agent's alarm colour and moves to the front, the tile shows what it's asking, and you can answer supported requests from the pad: press Deny, or hold Allow for 0.6 seconds. It uses Claude Code's hooks through its own plugin, so your notifications keep working as before.
If you also run Kimi Code, see Kimi Code notifications: hooks, NotifyUser and TUI settings for how its hooks and progress updates work.
See which session needs you. Download Orbtile for Mac or Windows
FAQ
Why don't I get notifications in the VS Code terminal? It doesn't receive Claude Code's desktop notification. Set preferredNotifChannel to terminal_bell, or add a Notification hook.
Can I get notified only for permission prompts? Yes. Give the Notification hook a matcher of permission_prompt.
How do I get an alert every time Claude finishes responding? The idle_prompt notification type waits about 60 seconds after Claude finishes responding. A Stop hook in your settings.json file fires whenever Claude finishes responding, so use one for an alert at the end of every turn.
Does Orbtile change my Claude Code settings? It installs its plugin through Claude Code's own command line. If that fails, it edits your Claude settings.json file and keeps a dated backup first. Removing the plugin in Orbtile's settings unregisters it.
Originally published at https://orbtile.com/guides/claude-code-notifications?s=devto-cc-notify
Comments
No comments yet. Start the discussion.