Codex works quietly in your terminal until it's done — or until it's stuck waiting for you to approve a command. anotifier turns both moments into notifications on your desktop, phone, or team chat.
Comparing options first? How to get notified when Codex CLI finishes or needs approval covers every method, built-in and DIY.
Setup registers three hooks with Codex CLI's own hook system in ~/.codex/hooks.json, and records them as trusted so Codex runs them without a review step.
StopCodex finished its turnTitled backend · Codex, with the body backend: Task complete. anotifier doesn't read Codex's reply, so the text is the same every time; the project name tells you which run finished.PermissionRequestCodex is waiting for your approvalbackend: Needs your input, sent urgent with its own sound. The command isn't in the alert; you see it in the terminal. anotifier never answers the request, so Codex's own approval prompt decides.SessionStartA Codex session startedQuiet by default: toast, phone push and bell are off for this event. A webhook, if you set one up, still receives Session started.Setup wires Codex when a ~/.codex folder exists. It backs up hooks.json to ~/.anotifier/backups/, then adds one entry per event to ~/.codex/hooks.json. This is the Stop one:
{
"hooks": {
"Stop": [
{
"hooks": [
{
"type": "command",
"command": "node \"/path/to/anotifier/src/notify.mjs\" --source codex --event Stop",
"timeout": 10,
"statusMessage": "Sending notification"
}
]
}
]
}
}PermissionRequest and SessionStart get the same entry with their own --event. In ~/.codex/config.toml, setup turns hooks on (renaming an older codex_hooks = true) and records a trust hash for each entry:
[features]
hooks = true
[hooks.state.'/home/you/.codex/hooks.json:stop:0:0']
trusted_hash = "sha256:…"Codex skips a new or edited hook until it is trusted, which is why setup writes the hashes. Edit an anotifier entry by hand and Codex skips it until you trust it again in /hooks, or rerun setup.
codex exec, so scripted runs finish without an alert.[tui] notifications setting can ding or post a desktop notification too; the Codex sound guide shows how to tune them so you don't hear two dings.[features] hooks = true as it is.npx anotifier@latest test # fire a test alert on every channel
npx anotifier@latest status # show which agents and channels are set up
npx anotifier@latest doctor # diagnose a channel that stays quiet
npx anotifier@latest uninstall # remove the hooks setup addedtest sends straight to your channels without going through Codex CLI, so it proves the channels work. uninstall removes only the entries anotifier added and restores your statusline (1.5.0 and later), and setup keeps a copy of every file it changes in ~/.anotifier/backups/.
Codex CLI has its own hook system. anotifier setup writes Stop, PermissionRequest and SessionStart hooks into ~/.codex/hooks.json, turns hooks on in ~/.codex/config.toml, and records a trust hash for each, so Codex runs them straight away.
No. It says my-app: Needs your input, sent urgent with its own sound. The command itself is in the Codex terminal, where you approve it.
No. anotifier only tells you that Codex is waiting. It never answers the PermissionRequest, so Codex's normal approval prompt decides.
Codex waits for each hook to finish, showing “Sending notification”, for at most 10 seconds. anotifier sends to every channel in parallel with shorter timeouts of its own and always exits cleanly, so a dead channel can't stall a run.
Codex runs hooks in the interactive TUI only, so codex exec runs finish without one.
Every command and config key is in the docs.
Full feature tour, demo video, and install options on the anotifier home page.