How to get Claude Code notifications on Mac

By Ismail · · 4 min read

Quick answer

Add a Notification hook to ~/.claude/settings.json that runs osascript. macOS will then alert you whenever Claude Code needs your attention.

Claude Code often stops to ask before it runs a command. If you've moved to another window, it can sit there waiting for minutes. A hook fixes that by telling your Mac to show a notification.

Add the notification hook

  1. Open ~/.claude/settings.json. Create it if it doesn't exist.
  2. Add the JSON below. If the file already has a hooks key, add Notification next to your other events.
  3. Type /hooks in Claude Code to check that the hook is listed.
~/.claude/settings.json
{
  "hooks": {
    "Notification": [
      {
        "matcher": "",
        "hooks": [
          {
            "type": "command",
            "command": "osascript -e 'display notification \"Claude Code needs your attention\" with title \"Claude Code\"'"
          }
        ]
      }
    ]
  }
}

Only get alerted for what matters

An empty matcher fires on every notification type. To narrow it, use one of these values:

  • permission_prompt fires when Claude needs approval and the prompt has waited about six seconds.
  • idle_prompt fires when Claude finished about 60 seconds ago and you haven't typed since.

If no notification appears

osascript sends notifications through Script Editor, and macOS may have them turned off.

  1. Open System Settings, then Notifications.
  2. Find Script Editor and turn on Allow Notifications.
  3. Test it by running the command below in Terminal.
Terminal
osascript -e 'display notification "test"'

A notification still sends you to another window

A notification tells you Claude is waiting, but you still have to find the right terminal and answer there. Little Notch shows your sessions in the notch, with the current tool, file and lines changed. When Claude asks for permission, you click Allow or Deny right there.

Coding Agents in Little Notch

See live sessions in your notch, and allow or deny Claude Code without switching windows.

See how it works

Common questions

Where do Claude Code hooks go?
Use ~/.claude/settings.json for all your projects, .claude/settings.json for one project you share, or .claude/settings.local.json for one project just for you.
Why isn't my Claude Code notification showing on Mac?
The osascript command sends notifications through Script Editor. Turn on Allow Notifications for Script Editor in System Settings, then test the command in Terminal.