How to get notified when Claude Code needs your approval on Mac

Claude Code stops and waits whenever it needs your permission, and it's easy to miss when you're in another window. Here are three ways to get alerted, from a free one-line setting to an alert right in your MacBook's notch.

Get Claude Code alerts in your notchNotchDodo, $4.99 one-time
The MacBook notch with the Claude mark on the left and Approve on the right, shown when Claude Code needs permission
What a Claude Code approval alert looks like in the notch with NotchDodo. Real screenshot.
The short answerClaude Code already fires a notification when it needs your permission or is waiting for input. To see it on a Mac, use iTerm2, Ghostty or Kitty (they show it automatically), set "preferredNotifChannel": "terminal_bell" in other terminals, or add a Notification hook to ~/.claude/settings.json that runs osascript. For an alert you can't miss, NotchDodo shows it in your MacBook's notch with one click.

When does Claude Code send a notification?

Claude Code has a Notification event that fires when Claude needs something from you and you appear to be away from the terminal. The type of notification tells you why:

  • permission_prompt: Claude wants to run a tool or command and needs your approval. It fires after the prompt has waited about six seconds.
  • idle_prompt: Claude finished responding about 60 seconds ago and you haven't typed since.
  • elicitation_dialog: an MCP server opened a form that needs your answer.

Separately, the Stop event fires every time Claude finishes a turn, which is how you get a "done" alert. Everything below builds on these events. The full list and exact timing are in Anthropic's Claude Code hooks reference.

Method 1: built-in notifications and the terminal bell

The quickest fix needs no hooks at all. Claude Code sends a desktop notification on its own in Ghostty, Kitty and iTerm2. If you use one of those, you may only need to let it through.

iTerm2

  1. Open Settings → Profiles → Terminal.
  2. Check Notification Center Alerts.
  3. Click Filter Alerts and enable Send escape sequence-generated alerts.

Apple Terminal, Warp, the VS Code terminal and others

These don't get the desktop notification, but you can make Claude Code ring the terminal bell instead. Add this to ~/.claude/settings.json:

~/.claude/settings.json
{
  "preferredNotifChannel": "terminal_bell"
}

A bell is easy to set up but easy to miss: it's a sound or a bouncing Dock icon, it doesn't say which project is waiting, and Apple Terminal's audible bell may be turned off (check Settings → Profiles → Advanced → Audible bell). If you run Claude Code inside tmux, add set -g allow-passthrough on to ~/.tmux.conf so alerts reach the outer terminal.

Method 2: a Notification hook with a macOS alert

A hook is a shell command Claude Code runs on an event. A Notification hook that calls osascript gives you a native macOS notification in any terminal.

Step 1: add the hook

Open ~/.claude/settings.json (create it if it doesn't exist) and add this. It's the example from Anthropic's guide:

~/.claude/settings.json
{
  "hooks": {
    "Notification": [
      {
        "matcher": "",
        "hooks": [
          {
            "type": "command",
            "command": "osascript -e 'display notification \"Claude Code needs your attention\" with title \"Claude Code\"'"
          }
        ]
      }
    ]
  }
}

If the file already has a hooks key, add "Notification" next to your existing events instead of replacing the whole object.

Step 2: let Script Editor show notifications

This is the step most people miss. osascript posts notifications as the Script Editor app, and if it doesn't have permission the command fails silently. Run this once in Terminal:

Terminal
osascript -e 'display notification "test"'

Then open System Settings → Notifications, find Script Editor and turn on Allow Notifications. Run the command again and you should see the test.

Step 3: check and test

Type /hooks in Claude Code. Your hook should appear under Notification. Edits to the settings file are picked up automatically. Now ask Claude to do something that needs permission, switch to another app, and within a few seconds you'll get an alert.

Make it more useful

An empty matcher fires on every notification type, including login messages. Limiting it to approvals and idle prompts, and adding a sound, makes it harder to miss:

~/.claude/settings.json
{
  "hooks": {
    "Notification": [
      {
        "matcher": "permission_prompt|idle_prompt",
        "hooks": [
          {
            "type": "command",
            "command": "osascript -e 'display notification \"Claude Code is waiting on you\" with title \"Claude Code\" sound name \"Glass\"'"
          }
        ]
      }
    ]
  }
}

Claude Code passes the event to your hook as JSON on standard input, so you can show which project is waiting. This is what it sends:

Notification hook input (stdin)
{
  "session_id": "abc123",
  "transcript_path": "/Users/you/.claude/projects/.../transcript.jsonl",
  "cwd": "/Users/you/code/aurora-shop",
  "hook_event_name": "Notification",
  "message": "Claude needs your permission to use Edit",
  "title": "Permission Required",
  "notification_type": "permission_prompt"
}

If you have jq installed (brew install jq), this version puts the project folder in the title and Claude's message in the body:

~/.claude/settings.json
{
  "hooks": {
    "Notification": [
      {
        "matcher": "permission_prompt|idle_prompt",
        "hooks": [
          {
            "type": "command",
            "command": "jq -r '\"display notification \\\"\" + .message + \"\\\" with title \\\"Claude Code: \" + (.cwd | split(\"/\") | last) + \"\\\"\"' | osascript"
          }
        ]
      }
    ]
  }
}
Want a "done" alert too? Add the same command under a "Stop" event. It fires every time Claude finishes a turn, so on short back-and-forth chats it can get noisy.

Hooks run shell commands with your permissions, so only add commands you understand, and keep them quick. A notification hook should never block or slow Claude down.

Method 3: an alert in your MacBook notch

macOS notifications slide away after a few seconds and pile up in Notification Center. If you run agents all day, you want something that stays put until you've answered, at the one spot on your screen you always see.

That's what NotchDodo does. It turns the MacBook notch into a small dashboard, and its Claude Code alerts make the notch light up with the Claude mark the moment Claude needs you:

NotchDodo notch alert: Claude mark and Approve
Approve: Claude needs your permission.
NotchDodo notch alert: Claude mark and Waiting
Waiting: Claude is waiting for your next prompt.
NotchDodo notch alert: Claude mark and a green Done
Done: a turn just finished. This one shows briefly, then clears.

How to turn it on

  1. Install NotchDodo and hover the notch.
  2. Open AI Usage and click the bell in the top right.
  3. That's it. Alerts start with your next Claude Code session.
The NotchDodo AI Usage header with the alerts bell highlighted
The bell in AI Usage turns Claude Code alerts on and off.

What it actually changes

NotchDodo uses the same hooks as Method 2, so there's nothing hidden. Clicking the bell adds one entry per event to ~/.claude/settings.json (after saving a backup next to it) that appends each event to a file in NotchDodo's folder:

What NotchDodo adds to ~/.claude/settings.json
"Notification": [
  {
    "matcher": "permission_prompt|idle_prompt|elicitation_dialog",
    "hooks": [{ "type": "command", "timeout": 5,
      "command": "{ cat; echo; } >> \"$HOME/Library/Application Support/NotchDodo/claude-events.jsonl\" 2>/dev/null; exit 0" }]
  }
],
"Stop": [ ...the same command, so you also see Done... ]

The command always exits successfully, so it can never slow down or break Claude Code, even if NotchDodo is closed. It doesn't listen to your prompts, nothing leaves your Mac, and clicking the bell again removes the hook and leaves your other settings untouched.

Because NotchDodo also reads Claude Code's session logs, the alert clears by itself once you approve or type, and it knows which project is waiting. The same panel shows every running session, the file Claude is editing and your 5-hour window. There's more on that in our Claude Code usage tracker guide.

NotchDodo AI Usage panel with Claude Code sessions, tokens, cost and the 5-hour window
AI Usage: live sessions, tokens, cost and the 5-hour window. Demo data shown.

Which method should you use?

Terminal bellmacOS notification hookNotchDodo notch alert
SetupOne line of JSONA hook plus a permissionOne click
Where it showsSound or Dock bounceBanner that slides awayThe notch, until you answer
Says which projectNoWith jqYes
Approve vs waiting vs doneNoWith separate hooksYes
Clears when you answerNot neededNoYes
Works in any terminalMostYesYes
CostFreeFree$4.99 one-time

If you only run Claude Code now and then, Method 1 or 2 is plenty. If agents run in the background most of your day, an alert that stays in the notch until you've dealt with it is what stops the "it was waiting for 20 minutes" moments.

Troubleshooting

  • Nothing happens at all: type /hooks. If your hook isn't listed, the JSON is probably invalid (a missing comma or quote). Paste the file into a JSON validator.
  • The hook runs but no banner appears: give Script Editor notification permission (Method 2, step 2), and check that a Focus mode or Do Not Disturb isn't on.
  • Alerts arrive late: that's by design. Approvals wait about six seconds and idle alerts about 60 seconds, so you aren't pinged while you're looking at the terminal.
  • No alerts inside tmux: add set -g allow-passthrough on to ~/.tmux.conf and run tmux source-file ~/.tmux.conf.
  • A project behaves differently: project settings in .claude/settings.json or .claude/settings.local.json can add their own hooks. Check those files too.
Never miss Claude Code waiting on you again.NotchDodo puts Claude Code alerts, live sessions and your 5-hour window in your MacBook notch, with 15 more tools. One-time purchase, no subscription.Get NotchDodo for $4.99See all 18 tools

Sources

Claude is a trademark of Anthropic. NotchDodo is an independent app and is not affiliated with Anthropic.

Frequently asked questions

Does Claude Code have notifications built in?

Yes. When Claude finishes or is waiting on a permission prompt and you seem to be away from the terminal, Claude Code fires a notification. By default it shows a desktop notification only in Ghostty, Kitty and iTerm2. In other terminals you can set preferredNotifChannel to terminal_bell in ~/.claude/settings.json, or add a Notification hook.

How long does Claude Code wait before it notifies me?

For a permission prompt, about six seconds after the prompt appears. For idle_prompt, about 60 seconds after Claude finished responding without you typing. The exact timing is in the Claude Code hooks reference and can differ outside the terminal.

Why don't I get a notification in the VS Code terminal or Warp?

Built-in desktop notifications only go to Ghostty, Kitty and iTerm2. In other terminals, use the terminal bell setting, a Notification hook that runs osascript, or an app such as NotchDodo that listens to Claude Code's hooks directly.

My osascript hook runs but no notification appears. Why?

osascript posts notifications as the Script Editor app. If Script Editor doesn't have notification permission, the command fails silently. Run osascript -e 'display notification "test"' once, then turn on Allow Notifications for Script Editor in System Settings > Notifications. Also check that a Focus mode isn't hiding it.

Can I get notified when Claude Code finishes a task?

Yes. The Stop hook fires every time Claude finishes responding, so a Stop hook with the same osascript command tells you when a turn is done. It fires on every turn, so it can get noisy on short exchanges. NotchDodo shows this as a short Done in the notch instead of a notification.

Do hooks slow down Claude Code?

A hook that runs a quick command, such as osascript or appending a line to a file, adds no noticeable delay. Keep hook commands short and always let them exit successfully, so a failure in your notification never blocks Claude.

Does NotchDodo send my Claude Code data anywhere?

No. NotchDodo's hook appends each event to a file in its own folder on your Mac, and NotchDodo reads that file locally. It doesn't record your prompts, and nothing is uploaded. Turning alerts off removes the hook again.

Where should I put the hook: user or project settings?

Put notification hooks in ~/.claude/settings.json so they work in every project. Use .claude/settings.json in a repo only if you want to share the hook with your team, or .claude/settings.local.json to keep a project-specific hook out of git.