Practical answers about Codex CLI hooks, notifications and approving or answering Codex from your phone, on Mac, Windows and Linux.
- How to get a notification when Codex finishesGet notified when the Codex CLI finishes or wants approval: built-in alerts, a Stop hook, the notify setting, and phone pushes. Mac, Windows and Linux.
- Codex hooks explained: hooks.json, trust and every eventWhat Codex CLI hooks are, where hooks.json goes, why hooks need trusting in /hooks, how matchers and output work, and what each event is for.
- The Codex notify setting: run a command when a turn completesHow notify in ~/.codex/config.toml works, the JSON it passes, a ready script for Mac, Windows and Linux, and when to use hooks instead.
- The Codex Stop hook: run something when Codex finishesHow the Codex CLI Stop hook works, the JSON it receives, why it must print nothing or JSON, and how decision block keeps Codex going.
- Answering Codex approval requests from a hook (PermissionRequest)How the Codex CLI PermissionRequest hook works, how to allow or deny from a script, what it receives, and when sandbox settings are the better tool.
- Approve Codex commands and patches from your phoneCodex's PermissionRequest hook can return allow or deny. How to approve or reject Codex CLI requests from your phone, by hand or with codex-notifier.
- Answer Codex's questions from your phoneWhen Codex asks you a question with request_user_input, mostly in plan mode, a PreToolUse hook can supply the answer. Here is how to reply from your phone.
- Connect your phone to Codex on Mac, Windows or LinuxPair your phone with the Codex CLI in a minute: install codex-notifier, then type the app's 6-digit code or scan a QR code. Mac, Windows and Linux.
- Using Codex from your phone: what works and what does notThe real options for using OpenAI Codex from an iPhone or Android phone: Codex on mobile in ChatGPT, cloud tasks, SSH, and hook-based push tools.
- Leave Codex running and walk away: a workflowA routine for long Codex CLI tasks: keep the computer awake, set the sandbox so it doesn't stop at every prompt, get pinged on your phone and reply.
- Codex CLI notifications on macOSGet a macOS notification when Codex finishes or wants approval: the built-in OSC 9 alert, an osascript hook, terminal-notifier, or codex-notifier.
- Codex CLI notifications on Windows (PowerShell and WSL)Get a Windows notification when the Codex CLI finishes or wants approval, natively or in WSL: the bell, BurntToast hooks, notify, or codex-notifier.
- Codex CLI notifications on LinuxGet a Linux desktop notification when the Codex CLI finishes or wants approval: the built-in OSC 9 alert, notify-send hooks, sounds, or codex-notifier.
- Notifications from Codex on a remote server over SSHRun the Codex CLI on a remote server over SSH and still get notified: escape sequences that travel over SSH, or a phone push with codex-notifier.
- Codex in tmux or screen: getting notified from a detached sessionGet notified when Codex in tmux finishes or needs you: allow-passthrough for OSC 9, bell alerts, naming the session, and phone pushes when detached.
- Every way to get Codex CLI notifications, comparedBuilt-in TUI alerts, notify, your own hooks, ntfy and chat webhooks, OpenAI's Codex on mobile and notifier apps, compared on what each can and cannot do.
- Codex CLI push notifications with ntfy (do it yourself)Send Codex CLI alerts to your phone with ntfy: a hook script for Mac, Windows and Linux, the hooks.json entries, and how to keep the topic private.
- Send Codex CLI notifications to Telegram, Slack or DiscordOne hook script that posts Codex CLI alerts to a Telegram bot, a Slack incoming webhook or a Discord webhook, on Mac, Windows and Linux.
- Codex's built-in notifications: tui.notifications, OSC 9 and the terminal bellHow the Codex CLI's built-in alerts work, what notification_method and notification_condition do, and how to set up iTerm2, Ghostty, Kitty and others.
- Codex notifications in VS Code, Cursor and JetBrainsWhy the VS Code terminal only beeps when Codex finishes, how to get real alerts with a hook or notify, and what applies to the Codex IDE extension.
- Codex notifications not working? A checklistHooks not running or no alert when Codex finishes? Work through this checklist, from /hooks trust and invalid Stop output to codex-notifier doctor.
- Quiet hours and Do Not Disturb for Codex notificationsStop Codex CLI notifications at night or in meetings: quiet hours in your hook, Focus and Do Not Disturb on the phone, and codex-notifier's quiet_hours.
- Codex approval modes and sandbox explained (on-request, never, workspace-write, --yolo)What Codex CLI's sandbox modes and approval policies do, the Auto and Read Only presets, auto-review, --yolo, and which setups are safe to leave running.
- Running several Codex sessions: knowing which one needs youRunning parallel Codex CLI sessions or worktrees? Put the project in every alert, name sessions, and send each answer back to the right session.
- Is it safe to approve Codex commands from your phone?How remote approval for the Codex CLI works, what can go wrong, what data leaves your computer, and the settings that keep it safe.
- Codex Remote Control: codex remote-control, /rc and the ChatGPT appWhat the experimental codex remote-control command and /rc do, how pairing codes work, what OpenAI's mobile docs support, and where a hook-based tool fits.
- Codex approval prompt options explained: allow once, this session, or don't ask againWhat each choice in the Codex CLI approval prompt does, how long it lasts, and where "don't ask again for commands that start with" is saved.
- Codex rules: allow, prompt or block commands with prefix_ruleHow to allow, prompt for or forbid commands in the Codex CLI with .rules files, prefix_rule, project rules, chained commands and codex execpolicy check.
- Log in to Codex on a headless server or over SSHSign in to the Codex CLI on a remote server with no browser using device code login, an SSH tunnel for port 1455, a copied auth.json, or an API key.
- Does Codex keep running when you close your laptop?The Codex CLI stops when your laptop sleeps. How to keep it awake on Mac, Windows and Linux, what Codex's own sleep setting does, and when cloud tasks fit.
- Where is Codex's config.toml? Locations, layers and precedenceWhere the Codex CLI keeps config.toml, how CODEX_HOME, project .codex folders and profiles layer on top, which file wins, and the notification keys.
- Codex notifications in the ChatGPT app: turn on, off and fixHow Codex notifications work in the ChatGPT mobile and desktop apps, how to turn them on or off, why they stop arriving, and how they differ for the Codex CLI.