Skip to content

Never Miss a Prompt: How to Make Claude Code Send You Mac & Phone Alerts When It Needs You!

Posted on:January 11, 2026 at 10:00 AM

Never Miss a Prompt: How to Make Claude Code Send You Mac & Phone Alerts When It Needs You!

If you use Claude Code, you know the frustration of losing focus while it’s quietly waiting for your next input—or finishing a long process without telling you. There’s a built-in feature called hooks that lets you run custom shell commands at key moments in Claude’s lifecycle, like when it needs your attention or finishes a response.

This guide shows you how to hook into those moments and trigger notifications on macOS using terminal-notifier, and even send messages to your phone with AppleScript (osascript).

🧠 What Are Hooks in Claude Code?

Hooks are user-configured shell commands that run automatically at specific events inside Claude Code, such as:

You configure these in a JSON settings file, where you tell Claude what commands to run for each hook event. Claude Docs

🛠 1. Install and Set Up terminal-notifier

On macOS, terminal-notifier lets you trigger native system alerts from the command line.

📥 Install

Open Terminal and install it with Homebrew:

brew install terminal-notifier

🔔 Enable Notifications

After installing, go to System Settings → Notifications → terminal-notifier and turn on “Allow Notifications” — otherwise macOS won’t show them.

🔧 2. Locate or Create Your Claude Hooks File

Hooks live inside settings files that Claude Code reads on startup. You can set them globally or per project:

LocationScope
~/.claude/settings.jsonGlobal (all projects)
.claude/settings.json (in project)Local to that project

If you don’t have a hooks section yet, you can create one.

📄 3. Add a Notification Hook for Waiting & Finished Alerts

Open the hooks file in your editor. For example:

nano ~/.claude/settings.json

Then add a Notification section like this:

{
  "hooks": {
    "Notification": [
      {
        "hooks": [
          {
            "type": "command",
            "command": "terminal-notifier -title \"Claude Code\" -message \"Claude is waiting for your input\""
          }
        ]
      }
    ],
    "Stop": [
      {
        "hooks": [
          {
            "type": "command",
            "command": "terminal-notifier -title \"Claude Code\" -message \"Claude has finished\""
          }
        ]
      }
    ]
  }
}

🧠 What This Does

Save and restart your Claude Code session so the new hooks take effect (Claude snapshots hooks at start). Claude Docs

📱 4. Optional: Send Alerts to Your Phone Using AppleScript

You can extend the notifications to your iPhone using AppleScript through osascript. Include this in your hook:

osascript -e 'tell application "Messages"     send "Claude has finished your task!" to buddy "+1234567890" of service "SMS" end tell'

Replace +1234567890 with your phone number.

You can combine both commands in the same hook — first terminal-notifier, then the osascript line — so you get both Mac and phone notifications.

🧪 5. Test Before You Rely On It

Run this in Terminal:

terminal-notifier -title "Test" -message "Notifications are working"

If you see a pop-up, you’re good to go.

To test phone alerts, run the osascript snippet manually first.

🧠 Best Practices

📌 Summary

Using Claude Code’s Notification and Stop hooks, you can make Claude:

✅ Tell you when it’s stuck waiting for input ✅ Alert you when tasks finish ✅ Even send notifications to your phone

All with just a few lines in your settings file and simple tools like terminal-notifier and osascript. Easy, reliable, and keeps you in control of your workflow.