guide / codex

Running Codex overnight: know when it needs you

Long Codex runs fail in a boring way: the agent reaches a choice it should not make alone and waits, sometimes for hours. The fix is not more supervision, it is a reliable way for the agent to reach you only when it matters.

Reduce what needs you

Decide in advance what the agent may do without asking. Write it in AGENTS.md: which directories are safe, what counts as irreversible, and the one rule for escalating, for example "ask me only for decisions that delete data or change the design; otherwise pick the simplest option and note it in the summary". Fewer, better questions matter more than a better notification channel.

Get a push when a turn ends

Codex CLI can run a program when events such as a finished turn occur. It is configured with a notify command in ~/.codex/config.toml, and that command can send a message to your phone, for example with ntfy. Check the current Codex documentation for the exact setting and the event payload your version passes, because this is still changing. Keep only the events you act on, or you will start ignoring the banner.

Where a banner falls short

A push tells you something happened. It does not carry your answer back, and a buried one at 2am means the run sits idle until morning. For the few real decisions, a phone call is harder to miss and lets you answer in a sentence. I built JustCallMe for that: the agent makes one HTTPS call, your phone rings, a voice states the task, the blocker and a recommendation, and your answer goes back to the same task. The same skill works with Claude Code and Codex. Unanswered calls are free and new accounts get 20 free minutes. Setup is in the developer docs.

A sensible overnight setup

See also the full comparison of notification options and the Claude Code hooks setup.