Codex CLI already notifies you when it needs approval or a response from you, but by default only while its terminal is in the background, and in some terminals as a silent banner. Under [tui] in ~/.codex/config.toml, set notification_condition = "always" to be alerted even when the window is in front, and notification_method = "bel" to get the terminal bell instead of a banner. For a real sound file, add a PermissionRequest hook that plays one. Here are both, plus how to ding only when Codex is waiting on you. For the rest of the notification setup (desktop toasts, the notify command, phone alerts) see Codex CLI notifications.
Rather skip the manual setup? One command wires every agent you have installed to desktop toasts, phone push, and Slack, Discord or Telegram:
Updated 2026-10-16 · also see the Codex CLI overview and the full docs
The Codex TUI has notifications built in, and they are on by default. Codex sends one when a turn ends, when it asks to run a command or edit files, when an MCP server asks for approval, and when a Plan mode prompt or a question is waiting for your answer. Two defaults decide whether you notice:
notification_condition defaults to unfocused, so nothing fires while the Codex window is in front.notification_method defaults to auto: an OSC 9 desktop notification in terminals Codex knows support it, and the terminal bell (BEL) everywhere else.| Terminal | auto sends | What you get |
|---|---|---|
| Ghostty, iTerm2, Kitty, Warp, WezTerm | OSC 9 | A desktop notification from the terminal app. Whether it plays a sound follows your OS notification settings for that app |
| Apple Terminal, Windows Terminal, VS Code, GNOME Terminal, Konsole, Alacritty, and the rest | BEL | Whatever the terminal does with its bell: a beep, a visual flash, or nothing if the bell is muted |
Put this in ~/.codex/config.toml. The list limits notifications to the ones that wait on you, bel forces the terminal bell, and always drops the unfocused-only rule:
[tui]
notifications = ["approval-requested", "plan-mode-prompt", "async-question"]
notification_method = "bel"
notification_condition = "always"| Type | Fires when |
|---|---|
agent-turn-complete | A turn ends. The notification previews Codex's reply |
approval-requested | Codex asks to run a command or edit files, or an MCP server asks for approval |
plan-mode-prompt | A Plan mode prompt is waiting for you |
async-question | Codex has asked you a question |
The bell is only as loud as your terminal makes it. For a sound file, use Codex hooks: PermissionRequest runs when Codex is about to ask for approval, and only then, and Stop runs when the turn ends. Add this to ~/.codex/hooks.json to hear Glass when Codex finishes and Ping when it needs you on macOS. The commandWindows override plays Windows sounds instead:
{
"hooks": {
"Stop": [
{
"hooks": [
{
"type": "command",
"command": "afplay /System/Library/Sounds/Glass.aiff",
"commandWindows": "powershell.exe -NoProfile -Command \"(New-Object Media.SoundPlayer 'C:\\Windows\\Media\\chimes.wav').PlaySync()\"",
"async": true
}
]
}
],
"PermissionRequest": [
{
"hooks": [
{
"type": "command",
"command": "afplay /System/Library/Sounds/Ping.aiff",
"commandWindows": "powershell.exe -NoProfile -Command \"(New-Object Media.SoundPlayer 'C:\\Windows\\Media\\notify.wav').PlaySync()\"",
"async": true
}
]
}
]
}
}"async": true tells Codex not to wait for the sound. Without it, Codex holds the approval prompt until the hook exits.command to paplay with a freedesktop sound from /usr/share/sounds/freedesktop/stereo/, such as complete.oga for Stop and message-new-instant.oga for approvals. It needs PulseAudio or PipeWire./hooks in Codex to review and trust these two; Codex warns at startup when hooks are waiting for review.hooks = true under [features] in config.toml.The notify setting runs your own program, but Codex currently sends it only one event, agent-turn-complete. It never fires for an approval prompt. Codex also ignores notify in a project's .codex/config.toml, so set it in ~/.codex/config.toml. Use it for a finished-turn sound or webhook, and one of the options above for approvals. The Codex CLI notifications guide covers notify as a desktop or phone alert.
npx anotifier@latest setupanotifier registers Codex's Stop and PermissionRequest hooks for you and sends each event to your desktop and, if you set it up, your phone. An approval request arrives as an urgent needs-input alert with the Reminder sound (Ping on macOS). A finished turn plays IM (Glass on macOS). Change either with toastSound:
{
"events": {
"task_complete": {
"toastSound": "Hero"
},
"needs_input": {
"toastSound": "Sosumi"
}
}
}anotifier also rings the terminal bell by default. If Codex's own [tui] bell fires too, you may hear two; turn one off with terminalBellEnabled: false in anotifier or notifications = false under [tui]. The Claude Code sound guide lists every sound name per platform; they are the same for Codex.
Under [tui] in ~/.codex/config.toml, set notifications = ["approval-requested", "plan-mode-prompt", "async-question"], notification_method = "bel" and notification_condition = "always". Or add a PermissionRequest hook to ~/.codex/hooks.json that plays a sound file (approvals only).
Yes. Those are the plan-mode-prompt and async-question notification types. Keep them in the [tui] notifications list with notification_method = "bel" and notification_condition = "always". A PermissionRequest hook fires only for approvals, so use the [tui] setting for prompts and questions.
Yes. List only the types that wait on you, such as notifications = ["approval-requested", "plan-mode-prompt", "async-question"], and leave out agent-turn-complete. A PermissionRequest hook also fires only for approvals.
By default Codex notifies only while its terminal is unfocused, and in Ghostty, iTerm2, Kitty, Warp and WezTerm it sends a desktop notification instead of ringing the bell. Also check that your terminal's bell isn't muted and that notifications isn't set to false under [tui].
Yes. Keep agent-turn-complete in the [tui] notifications list, or add a Stop hook that plays a file. The notify setting also fires on agent-turn-complete and can run any script.
Not with "async": true. Without it, Codex waits for the hook, so the approval prompt appears only after the sound finishes.
One command wires every agent you have installed: Claude Code, Codex CLI, Cursor, and Gemini CLI.
npx anotifier@latest setup