All guides

Quiet hours and Do Not Disturb for Codex notifications

Updated 19 November 2026 · 4 min read

To keep Codex CLI notifications quiet at night or in meetings, you have three layers to work with: the hook itself (skip sending during set hours), the operating system (Focus on iPhone and Mac, Do Not Disturb on Android, Windows and Linux), and the tool you use to send alerts. Codex has no quiet-hours setting of its own, so the schedule lives in your hook script, your devices or your notification tool. With Notifier for Codex, codex-notifier config set quiet_hours 22:00-08:00 does it in one line.

01What Codex itself can switch off

Codex's own settings are on or off, not scheduled:

  • The built-in terminal alert: notifications = false under [tui] in ~/.codex/config.toml, or limit it to some events with a list such as ["approval-requested"].
  • Hooks: disable an individual hook in /hooks, or all of them with hooks = false under [features]. Turning off all hooks also turns off any policy hooks you rely on, so prefer the narrower options.

For a schedule, add the logic to your hook.

02Quiet hours in your own hook

A notification hook is just a script, so it can check the time before sending. In a shell script:

#!/bin/sh
hour=$(date +%H)
# Quiet from 22:00 to 08:00
if [ "$hour" -ge 22 ] || [ "$hour" -lt 8 ]; then
  cat >/dev/null   # read and ignore the hook's input
  exit 0
fi
# ...send the notification as usual...

In PowerShell:

$hour = (Get-Date).Hour
if ($hour -ge 22 -or $hour -lt 8) { exit 0 }

Exiting 0 with no output tells Codex the hook succeeded and changes nothing. For a PermissionRequest hook, that means the approval prompt appears in the terminal as normal, waiting for you in the morning.

You can make the rule smarter: skip weekends, or only send for long turns. Keep it simple enough that you trust it, or you'll miss the one alert that mattered.

03Do Not Disturb on your devices

The device layer catches everything, including alerts from tools you didn't write.

  • iPhone and Mac: Focus. Set a Sleep or Work Focus on a schedule. To let urgent Codex alerts through, add your notifier app to the Focus's allowed apps; to silence them, leave it out. Notifications still arrive in Notification Center for the morning.
  • Android: Do Not Disturb. Settings > Notifications > Do Not Disturb, with a schedule. Add exceptions for apps you want to hear from.
  • Windows: Do Not Disturb (Focus assist on older versions) in Settings > System > Notifications, with automatic rules for set times.
  • Linux: most desktops have a Do Not Disturb toggle in the notification area; GNOME and KDE Plasma both do.

For ntfy, the app can also mute a topic for a set time, and messages sent with a high priority can still break through if you allow it.

04Quiet hours with Notifier for Codex

Notifier for Codex has quiet hours built in, set per computer:

codex-notifier config set quiet_hours 22:00-08:00
codex-notifier config set quiet_hours off      # clear it

Times are the computer's local time, and ranges across midnight work. You can also set them for each computer from the phone app.

During quiet hours, nothing goes to the phone and nothing waits for it: Codex asks in the terminal as usual, as if no phone were paired. That's deliberate. A quiet phone shouldn't leave Codex waiting all night for an answer that won't come.

Other settings that keep things calm:

  • quiet_when_present (on by default): while you're at the terminal Codex runs in, the phone gets nothing.
  • notify_on_done, notify_on_permission, notify_on_question: turn each kind of alert off on its own. For example, codex-notifier config set notify_on_done off keeps approvals and questions but drops "finished" pushes.
  • sound: turn off the sound of the desktop notifications on the computer.

Notifier for Codex is an independent app for Mac, Windows and Linux computers with iPhone and Android apps; it isn't affiliated with OpenAI.

05Which layer to use

  • Never want night alerts from Codex: quiet hours in your hook or in codex-notifier.
  • Want silence from everything at night: a scheduled Focus or Do Not Disturb.
  • Running a long job overnight and want to hear only if it's stuck: turn off "finished" alerts and allow your notifier app through Focus, so only approvals wake you.

06FAQ

Does Codex have a do-not-disturb setting?

No. It has on and off switches for its built-in alert and for hooks, but nothing scheduled. Put the schedule in your hook, your devices or your notification tool.

If my hook skips an approval at night, will Codex wait?

Yes. A PermissionRequest hook that sends nothing and makes no decision leaves the normal prompt in the terminal, and Codex waits there until you answer.

What time zone does codex-notifier's quiet_hours use?

The computer's local time. If your server runs in UTC, set the hours in UTC.

Will notifications sent during Focus be lost?

No. They're delivered quietly and stay in Notification Center or the notification shade.

Notifier for Codex Get a push on your phone when Codex finishes or needs you, then approve, reject or answer from there. The codex-notifier command line tool is free on Mac, Windows and Linux.