How to know when Codex is done on your Mac

Codex can run a command when a turn ends. Set that up yourself, or let TapNoise connect Codex in Settings > Agents and play a sound when it finishes.

Codex works on a task while you do something else, and the hard part is knowing when a turn has ended. Codex has a built-in way to run a command at that moment. You can use it directly, or let TapNoise set it up and play a sound for you.

The built-in route: the notify setting

Codex reads its configuration from ~/.codex/config.toml. Its notify setting names a program to run each time Codex finishes a turn. The program receives a JSON string describing the turn as its argument.

That means you need a small program of your own, usually a script, that reads the argument and does something: plays a sound, or posts a macOS notification. I have not written a working script for this post, and the exact JSON fields can change between Codex versions. Check OpenAI’s Codex configuration reference for the current format before you rely on it.

Two cautions. Codex’s configuration is a TOML file, so keep the syntax exact. And if you already have a notify setting, back up the file and fold its existing command into your script, rather than adding a second notify line.

The easier route: TapNoise

TapNoise is a menu bar app that can connect Codex for you. When Codex finishes a turn, TapNoise plays a short cue in the sound theme you picked, and Tappy on your desktop reacts.

  1. Open TapNoise Settings and go to Agents.
  2. Under Connect your agents, click Connect next to Codex.
  3. Restart Codex if it was already running, so it picks up the change.

Here is what TapNoise does to the file. It puts its own notify command at the top of ~/.codex/config.toml. If you already had a notify command, TapNoise keeps it after --then, so your command still runs. It backs up the file first to ~/Library/Application Support/TapNoise/Agent hook backups. Remove in the same place takes TapNoise’s entry out again.

The hook passes only three things: the agent’s name, whether it is done, needs you or hit an error, and the app it runs in. It does not pass your prompts or the text Codex wrote.

What the cue covers

TapNoise’s cues are for three kinds of event: done, needs you, and error. Codex’s notify route is for the end of a turn, so that is the cue you will reliably get from it. I have not confirmed that Codex sends the same signal for every kind of waiting, so do not rely on the cue to tell you about an approval request.

TapNoise also connects Claude Code and Cursor from the same Agents page. For Claude Code, see how to get a sound when Claude Code finishes.

Things to check

  • Play agent sounds on the Agents page must be on for any cue to play.
  • Sounds on in General must be on, or TapNoise stays quiet.
  • Quiet during calls silences the cue while a call is using your microphone, which is usually what you want.
  • Knock twice to answer can bring a waiting agent’s window forward. Knocks need an Apple silicon MacBook.

The Agents page is part of the TapNoise license. A one-time purchase is US$7.99 plus tax, with a 14-day money-back guarantee, and one key works on up to two Macs.

The short version

If you want to script it, Codex’s notify setting will run your program at the end of each turn. If you want a sound without writing anything, connect Codex in TapNoise’s Agents page and restart it. Either way, you stop checking the window every few minutes.

About the author

Rudra Satani makes TapNoise. Spotted a mistake? Email support@tapnoise.com, or reach out at @rudraxx13.

Hear TapNoise on your Mac

Every sound is made by TapNoise itself. Try the sounds on the homepage first, then download the app.