cd /news/ai-agents/get-notified-when-claude-code-needs-… · home › topics › ai-agents › article
[ARTICLE · art-177495] src=dev.to ↗ pub= topic=ai-agents verified=true sentiment=· neutral

Get notified when Claude Code needs approval or finishes

A developer documented how Claude Code, Anthropic's terminal coding agent, signals when it finishes a task or pauses at a permission prompt while the user is away. The guide covers built-in desktop notifications in Ghostty, Kitty and iTerm2, push alerts from the Claude desktop app and Dispatch, the OSC 7501 Program Status Protocol supported in Claude Code 2.1.295 and later, and fallbacks such as terminal bells and custom Notification hooks. It also details tmux passthrough settings and the Apple Terminal configuration needed to hear an audible bell.

recommendation

Set preferredNotifChannel to iterm2, kitty or ghostty and enable tmux allow-passthrough so coding-agent approval prompts reach you; use a Notification hook or terminal bell where desktop alerts aren't supported.

more in playbook: Working with AI coding agents
by read7 min views2 publishedNov 27, 2026

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.

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.

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 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:

osascript -e 'display notification "Claude Code needs your attention" with title "Claude Code"' in the hook command.osascript routes notifications through Script Editor, which needs notification permission.osascript -e 'display notification "test"' once in Terminal, then turn on Allow Notifications for Script Editor in System Settings > Notifications. notify-send 'Claude Code' 'Claude Code needs your attention' in the hook command.notify-send needs a desktop notification daemon.libnotify-bin package.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 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 seconds
idle_prompt (Notification ) Claude finished responding about 60 seconds ago and you haven't typed since
elicitation_dialog (Notification ) An MCP server opens an elicitation form and you haven't typed for about six seconds
elicitation_url_dialog (Notification ) An MCP server asks you to open a browser URL and you haven't typed for about six seconds
agent_needs_input (Notification ) A background session starts waiting on your input while agent view is open
agent_completed (Notification ) A background session finishes or fails while agent view is open
Stop (hook event, no matcher) Claude finishes responding. It doesn't fire on a user interrupt, and an API error fires StopFailure instead
PermissionRequest (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.

The Claude app for iOS and Android can receive push notifications for sessions running on your computer:

claude remote-control, or run /remote-control inside an open session.Connect new sessions to Remote Control in Settings > Code or Settings > Claude Code. remoteControlAtStartup setting connects Remote Control automatically when a session starts.notify me when the tests finish. inputNeededNotifEnabled setting gets you a push notification when Claude is waiting on you.agentPushNotifEnabled setting lets Claude send a push notification to your phone when it decides to.

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

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

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

── more in #ai-agents 4 stories · sorted by recency
── more on @claude code 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
→ Live at https://your-agent.zahid.host ✓
Get free account → Pricing
from €0/mo · no card required
LIVE [news/get-notified-when-cl…] indexed:0 read:7min 2026-11-27 · —