Guide ▪ Guides

How to get notified when Claude Code or Codex finishes

You start a task, switch windows, and forget to look back for twenty minutes. This guide shows the DIY ways to get a ping when Claude Code or Codex is done or waiting on you, and how Synapse handles it.

Updated 6 min readWritten by the Synapse team
Short answer

To get notified when Claude Code finishes, add a Stop hook in Claude Code's settings.json that runs a notification command. For Codex, set notify in ~/.codex/config.toml to a script. Both are free and take a few minutes, but you set them up per tool, write the script yourself, and get a generic message. The Synapse Mac app shows a done notification with the start of the agent's reply and plays a sound when an agent finishes, with a different sound on error, and its iPhone app (a TestFlight beta) lets you follow progress away from the desk.

The problem

Coding agents take minutes. You send a prompt to Claude Code, flip to email, and it finishes in four minutes. You notice in twenty. Or it stopped after thirty seconds to ask for permission and sat there. A good done notification tells you when it finished (or is waiting on you), which agent it was, and enough of the reply to know if you need to look now.

The options at a glance

OptionClaude CodeCodexSetupTells you which agent and what it saidReaches your phone
Watch the terminalYesYesNoneYou lookNo
Terminal bell or OS notification from a hookStop and Notification hooksnotify programEdit config per tool, write a commandOnly what your script addsNo
Hook that sends a phone push (ntfy, Pushover and similar)YesYesHook plus a push serviceOnly what your script addsYes
Synapse done notificationsYesYesInstall the Mac appYes, the start of the replyYou can follow progress in the beta iPhone app

1. Claude Code: a Stop hook

Claude Code runs hooks at points in its lifecycle. They are configured in settings.json (for example ~/.claude/settings.json for all projects). The Stop hook runs when Claude finishes responding. The Notification hook runs when Claude Code sends a notification, such as when it needs your permission or has been waiting for input.

A minimal macOS example that shows a notification for both:

{
  "hooks": {
    "Stop": [
      {
        "hooks": [
          { "type": "command", "command": "osascript -e 'display notification \"Claude Code finished\" with title \"Claude Code\"'" }
        ]
      }
    ],
    "Notification": [
      {
        "hooks": [
          { "type": "command", "command": "osascript -e 'display notification \"Claude Code needs you\" with title \"Claude Code\"'" }
        ]
      }
    ]
  }
}

On Linux you would use notify-send instead of osascript. To get a sound, add afplay /System/Library/Sounds/Glass.aiff on macOS.

  • Good: built in, free, runs for every Claude Code session.
  • Bad: the message is whatever your command prints. To show the project or the reply, your script has to parse the JSON the hook receives on stdin. If you already have other hooks, you have to merge by hand.

2. Codex: the notify setting

Codex can run an external program when a turn finishes. Set notify in ~/.codex/config.toml to a command, and Codex calls it with a JSON payload describing the event as the last argument.

notify = ["python3", "/Users/you/bin/codex-notify.py"]
import json, subprocess, sys
event = json.loads(sys.argv[-1])
if event.get("type") == "agent-turn-complete":
    subprocess.run(["osascript", "-e",
        'display notification "Codex finished" with title "Codex"'])
  • Good: official, simple, and the payload includes enough to build a richer message if you want to.
  • Bad: a separate script with a separate format from Claude Code's hooks. Every new agent CLI means another config to learn.

3. Sending the ping to your phone

Both hooks can run any command, so you can curl a push service like ntfy or Pushover instead of showing a desktop notification:

curl -d "Claude Code finished" ntfy.sh/your-private-topic
  • Good: works when you are away from the desk.
  • Bad: one more service to manage, and a public ntfy topic name works like a password, so pick a long random one. You get "finished" but not the reply.

4. Synapse done notifications

Synapse is what we build, so weigh this section accordingly. Synapse is a free, MIT licensed app that connects coding agents to each other, to your iPhone, and to your friends' agents. Its Mac app runs Claude Code, Codex, Gemini, OpenCode, Cursor, Copilot, Amp or a shell in real terminals, in a GUI view or a Terminal view.

What you get, with no hook writing:

  • Working lights for every agent, so you can see at a glance which ones are busy.
  • Done notifications that include the start of the agent's reply, so you know which agent finished and roughly what it said.
  • Sounds: Bubble tap or Perk when an agent is done, and a low purr on error.
  • Automatic setup: on first launch from Applications, and after each update, the app adds its MCP server, hooks and the synapse skill to the agent CLIs you have installed. It backs up each config as <file>.bak-synapse first. Agents that were already running need a restart to pick it up. You can rerun it from Settings > Set up.
  • Your phone: the "Synapse Agents" iPhone app shows every agent on your Mac in rooms by project. Follow replies and progress, message an agent, or start a new one. Screenshots agents take appear inline. See the phone page.

Honest limits

  • The iPhone app is a beta on TestFlight, not on the App Store yet.
  • The Mac app is Apple Silicon first. The Windows build is not code-signed yet.
  • Messages to agents you started outside the app are pull, not push: they arrive on the agent's next prompt or inbox check.
  • If one tool and one notification is all you need, a Stop hook is simpler.

Synapse quick start

  1. Download from app.heysynapse.dev/signup and open it from Applications.
  2. Let automatic setup finish, then restart any agents that were already running.
  3. Start Claude Code or Codex from the app and switch away. You get a notification and a sound when it is done.

Which option should you use?

  • One Claude Code session, desktop only: a Stop hook with osascript or notify-send.
  • Codex only: the notify setting with a small script.
  • Pings on your phone, and you do not mind a push service: either hook plus ntfy or Pushover.
  • Several agents across tools, and you want to know which one finished and what it said: Synapse. See also how to use Claude Code from your iPhone and the canvas.

FAQ

How do I get a notification when Claude Code finishes?

Add a Stop hook to Claude Code's settings.json that runs a notification command, such as osascript on macOS or notify-send on Linux. It runs every time Claude finishes responding.

How do I know when Claude Code is waiting for permission?

Use the Notification hook in settings.json. Claude Code runs it when it sends a notification, for example when it needs your permission or has been idle waiting for input.

How do I get a notification when Codex finishes?

Set notify in ~/.codex/config.toml to a program. Codex runs it with a JSON payload when a turn completes, and your program can show a desktop notification or play a sound.

Can Claude Code play a sound when it is done?

Yes. Run a sound command such as afplay on macOS from a Stop hook. The Synapse Mac app plays Bubble tap or Perk when an agent is done and a low purr on error, with no setup.

Can I get notified on my phone when a coding agent finishes?

With hooks, you can curl a push service like ntfy or Pushover. With Synapse, the beta iPhone app shows every agent on your Mac with its replies and progress, so you can check and reply from the phone.

Link your agents.

Open source and MIT. No account needed on your own machine. Works next to whatever you use today.