See when Codex needs your approval, or finishes (Mac).
Codex can tell you when it finishes and when it is waiting for your OK, but its notify setting only covers the first. This guide explains what each Codex alert setting does on a Mac, with snippets checked against OpenAI's docs.
Codex's notify setting runs your program only when a turn completes, not for approvals (as of October 2026). To hear about approvals, use Codex's built-in terminal notifications ([tui] notifications, on by default while the terminal is in the background, as a banner only in some terminals) or a PermissionRequest hook in ~/.codex/hooks.json. In the ChatGPT desktop app, turn on permission notifications in Settings > Notifications.
Cowork Island
macOS 14 or later.
Apple silicon and Intel.
No account needed for Free.
Which Codex setting does what.
Here are four ways Codex can alert you on a Mac. A turn is one round of work: you send a message, Codex works, then it stops and waits for you. A hook is a command Codex runs at a set moment, such as just before it asks for your approval.
| Setting | Where it lives | Turn finished | Needs approval | Good to know |
|---|---|---|---|---|
notify | ~/.codex/config.toml | Yes | No | Off until you set it. Runs one program of your choice. |
[tui] notifications | ~/.codex/config.toml | Yes | Yes | On by default. Fires when the terminal is not in front. Shows a banner only in terminals that support it. |
Hooks (Stop, PermissionRequest) | ~/.codex/hooks.json | Yes | Yes | On by default. Each new hook must be trusted in /hooks before it runs. |
| ChatGPT desktop app | Settings > Notifications | Yes | Yes | Separate switches for turn completion, permission and question alerts. |
A common mix-up is to set notify and then wait for an approval alert that never comes. OpenAI's configuration docs say notify fires only for agent-turn-complete for now. For approvals, use one of the other three rows.
Start with Codex's built-in alerts.
Codex's terminal notifications are on by default, so you may already get them. They fire only when the terminal (the app where Codex runs, such as Terminal or iTerm2) is not the app in front. To choose the events yourself, set them in your config file.
Add to ~/.codex/config.toml. If the file already has a [tui] section, put these keys under it; don't add a second [tui] header. The terminal list in the comment comes from Codex's source code, not its docs (see below).
[tui]
notifications = ["agent-turn-complete", "approval-requested"]
notification_method = "auto" # osc9 in iTerm2/Ghostty/Kitty/Warp/WezTerm; bel elsewhere
notification_condition = "unfocused" # or "always"
With notification_method set to auto, Codex picks how to signal: osc9 sends a special code (an escape sequence) that some terminals turn into a desktop notification, and bel rings the terminal bell. Set notification_condition to "always" if you want alerts even while you are looking at the terminal.
Why Terminal only rings a bell.
OpenAI's docs don't name the terminals that show a banner. Codex's public source code (so this can change) sends the banner sequence to Ghostty, iTerm2, Kitty, Warp and WezTerm, and a plain bell to every other terminal, including the Terminal app that comes with macOS. A bell alone makes no banner. In Terminal, Settings > Profiles > Advanced > Bell offers a visual bell, a Dock badge and a Dock icon that bounces while the window is in the background. For a real banner in Terminal, use the hook further down.
Inside tmux, Codex's banner sequence only gets through when allow-passthrough is turned on: with on, only from a pane you can see; with all, from hidden panes too (tmux manual). Add this line to ~/.tmux.conf, or write all instead of on to get alerts from hidden panes:
set -g allow-passthrough on
Get a Mac banner when a turn finishes, with notify.
notify runs one program when a turn completes and hands it the details as a single JSON argument. It works the same in any terminal. OpenAI's example uses terminal-notifier, a third-party Homebrew tool that doesn't come with macOS. The script below uses only what ships with macOS: it shows the start of Codex's last reply and the project folder, and plays the Glass sound.
Step 1. Save this as a new file, ~/.codex/notify-macos.js:
// Codex notify -> macOS banner + sound. Codex appends one JSON argument.
function run(argv) {
var n = {};
try { n = JSON.parse(argv[argv.length - 1] || "{}"); } catch (e) {}
if (n.type && n.type !== "agent-turn-complete") return;
var app = Application.currentApplication();
app.includeStandardAdditions = true;
var msg = String(n["last-assistant-message"] || "Turn complete").slice(0, 180);
var folder = String(n.cwd || "").split("/").pop();
app.displayNotification(msg, { withTitle: "Codex finished", subtitle: folder, soundName: "Glass" });
}
Step 2. Add this line to your existing ~/.codex/config.toml, above the first [section] header. Replace YOUR_NAME with the name of your home folder: Codex runs this list as written, so ~ is not expanded (from Codex's source code, not its docs).
notify = ["/usr/bin/osascript", "-l", "JavaScript", "/Users/YOUR_NAME/.codex/notify-macos.js"]
Three things that break notify:
- A second
notifyline. A config holds only one, and a repeated key stops the file from loading. If another tool already uses it, point it at a small script that runs both programs, or use aStophook instead, since hooks from every file run side by side. - The wrong place in the file. Pasted at the end, below a
[section]header, the line belongs to that section and Codex won't read it asnotify. - A project config. Codex ignores
notifyin a project's own.codex/config.toml. It only works in~/.codex/config.toml.
If no banner appears, open System Settings > Notifications. Anthropic's hooks guide says banners sent with osascript are listed there under Script Editor, which you must allow, and that macOS won't ask you first. The name you see may differ on your Mac.
Get an approval banner with a Codex hook.
Hooks give you a real approval banner in any terminal, Terminal included. Codex runs a PermissionRequest hook just before it asks you to approve something, and a Stop hook when a turn finishes. PermissionRequest does not fire for commands that need no approval.
Merge into ~/.codex/hooks.json. If the file exists, don't replace it: other tools may keep their entries there (Cowork Island does, once you switch Codex on in it). Add each entry below to the matching list inside "hooks", create the list if it is missing, and keep each entry in its own braces.
{
"hooks": {
"PermissionRequest": [
{ "hooks": [ { "type": "command", "async": true, "timeout": 10,
"command": "/usr/bin/osascript -e 'display notification \"Codex needs your approval\" with title \"Codex\" sound name \"Funk\"' >/dev/null 2>&1" } ] }
],
"Stop": [
{ "hooks": [ { "type": "command", "async": true, "timeout": 10,
"command": "/usr/bin/osascript -e 'display notification \"Codex finished\" with title \"Codex\" sound name \"Glass\"' >/dev/null 2>&1" } ] }
]
}
}
- Save the file, open Codex and type
/hooks. - Trust both new entries. Codex skips new or changed hooks until you trust them, so an untrusted hook looks broken.
- Keep the
>/dev/null 2>&1ending: aStophook must print JSON or nothing.
For a spoken line or a phone alert instead, the notify setup generator builds the entry in your browser and names the file it goes in.
Codex in the ChatGPT desktop app.
Since 9 July 2026, the Codex app is part of the ChatGPT desktop app on macOS. Its alerts live in the app, not in config files:
- Settings > Notifications (Cmd+,): show turn-completion alerts never, only while ChatGPT is in the background, or always, with separate switches for permission and question notifications.
- Sound: one notification sound for finished tasks, permission requests and questions. Choose Default, Classic or None; on macOS a system sound or a file you import also works.
- Activity: where it is available, the bell in the sidebar, or Cmd+Option+U, lists chats that are unread, running or waiting for you.
The [tui] keys above are for Codex in a terminal. OpenAI's docs don't say whether notify or your own hooks run for chats in the desktop app, so don't count on them there.
The no-setup option.
Cowork Island is a macOS 14+ app that keeps your AI agent sessions from supported tools in a notch panel, showing the state of each one. You see which Codex or Claude Code session is working and which one “Needs you”, and the alerts are part of that view.
Codex is off until you switch it on in Settings and then allow Cowork Island's hooks in Codex, a trust step like the one above. After that, each Codex session shows its status. By default, when one needs you, the island opens by itself, unless that session's terminal, or the ChatGPT app for its own Codex chats, is already in front; you can turn this off with “On a question” in Settings. When a session finishes, the island opens for 5 seconds by default. Codex in the ChatGPT app shows “Needs you” too, and you answer in ChatGPT. On the island you can allow or deny supported Claude Code requests, or answer a multiple-choice question. With other tools, you may need to respond in their own app or terminal.
Cowork Island doesn't post macOS notifications. The island itself opens. Sounds are off until you turn them on; the “Approval needed” sound is free and the “Session complete” chime is part of Pro. It doesn't use Codex's notify setting, so your notify script keeps working. It adds its own entries to ~/.codex/hooks.json alongside yours: keep your hooks in their own entries, as in the snippet above, and outside its ~/.perch folder, and it leaves them in place.
Free shows one session card at a time. Pro shows all your sessions, lets you jump back to them and adds detailed usage meters, completion sounds and more mascot options. A 7-day Pro trial starts by itself, once per Mac, without payment details. See Plans and how to install it.
Download for freeSources.
- OpenAI: Advanced configuration
- OpenAI: Configuration reference
- OpenAI: Sample configuration
- OpenAI: Hooks
- OpenAI: Notifications
- OpenAI: Settings reference
- OpenAI: Changelog
- openai/codex source code (terminal list only)
- Apple: Terminal profile Advanced settings
- Apple: Displaying notifications
- tmux manual
- Anthropic: Claude Code hooks guide (Script Editor)
Sources checked 18 October 2026. This guide is written by Cowork Island's maker. For corrections, email support@coworkisland.com or open an issue on GitHub.