Guide
How to get notified when Codex finishes or needs approval
Codex can tell you when a turn completes or when it is waiting for your approval. There are two built-in ways to set it up, and each has its limits.
The short answer
- Inside the terminal: turn on
notificationsin the[tui]section of~/.codex/config.toml. - Run your own command when a turn completes: set
notifyto a script in the same file. - Every session on your Mac and your dev box in one place: use Notchbird.
Try Notchbird free for 14 days, with every feature and no card.
1. Built-in TUI notifications
The Codex terminal interface can send a terminal notification for chosen events. It uses an OSC 9 escape sequence where the terminal supports it and falls back to the bell.
# ~/.codex/config.toml [tui] notifications = ["agent-turn-complete", "approval-requested"] notification_method = "auto" # "auto", "osc9" or "bel" notification_condition = "unfocused" # or "always"
Setting notifications = true turns on every event. Ghostty, Kitty, iTerm2 and WezTerm show OSC 9 messages as desktop notifications; other terminals ring the bell.
2. A notify script
The notify key runs a program of your choice and passes it one JSON argument. Today it fires for agent-turn-complete, with the thread-id, turn-id, cwd, input-messages and last-assistant-message.
# ~/.codex/config.toml notify = ["python3", "/Users/you/.codex/notify.py"]
# ~/.codex/notify.py
import json, subprocess, sys
event = json.loads(sys.argv[1])
if event.get("type") == "agent-turn-complete":
text = (event.get("last-assistant-message") or "Turn complete")[:120]
subprocess.run(["osascript", "-e",
f'display notification {json.dumps(text)} with title "Codex"'])
The script runs where Codex runs. On a remote machine, osascript isn't available and the alert never reaches your Mac. And because notify covers completed turns only, approval requests need the TUI setting above.
3. Notchbird: Codex sessions in the notch
Notchbird reads up to 16 recent Codex sessions from CODEX_HOME or ~/.codex, alongside your Claude Code sessions. Sessions on this Mac appear when Python 3.9 or later is available; for a dev box, add an SSH alias you already use. The Codex count ring shows sessions that need you or have unseen results, alongside a separate Claude Code ring. Select a ring to open Inbox, then choose the session. Approval requests use a contained red cue, and the session opens in Codex through a codex://threads/ link. You answer the approval in Codex: Notchbird can't approve Codex requests from the notch yet.
- It leaves
config.tomlalone and puts nothing on remote machines. - Approval requests and finished turns from your Mac and one SSH machine, in one inbox. You approve in Codex.
- By default it asks macOS to leave it out of screen sharing.
Codex cloud tasks
Tasks you start in Codex cloud run on OpenAI's servers, so neither the [tui] settings nor a notify script on your Mac fires for them, and Notchbird doesn't see them either. Notchbird reads sessions on your Mac and on one SSH machine.
Which should you use?
| Method | Alerts for approval requests | Remote sessions | Setup |
|---|---|---|---|
| TUI notifications | Yes | Through the terminal, if it supports OSC 9 | Three lines of TOML |
| notify script | No, completed turns only | Runs on the remote machine | A config line and a script |
| Notchbird | Yes, with one click to the session; it can't answer Codex approvals yet | Yes, one SSH machine alongside this Mac | Install the app (add an SSH alias for another machine) |
Common questions
Does Codex have built-in notifications?
Yes. Set notifications in the [tui] section of ~/.codex/config.toml to true or to a list of events such as agent-turn-complete and approval-requested.
What does the Codex notify setting send?
notify runs your program with one JSON argument containing type (agent-turn-complete), thread-id, turn-id, cwd, input-messages and last-assistant-message.
Can I get Codex approval requests as macOS notifications?
Yes, through the TUI notifications setting with approval-requested in the list, in a terminal that shows OSC 9 notifications. The notify script does not fire for approvals.
Want this without wiring up hooks? Notchbird shows Claude Code and Codex alerts in your MacBook's notch, with one click back to the session.
Try Notchbird free