Mode: Codex foreground checkpoint.
When this session owns supervision and away mode is not active:
- Drain first with
bin/fm-wake-drain.sh. - Source
__FM_X_MODE_ENV__first when X mode is active. - Run one foreground watcher checkpoint with
bin/fm-watch-checkpoint.sh --seconds "${FM_CODEX_WATCH_CHECKPOINT:-180}". - If the command prints
signal:,stale:,check:, orheartbeat, drain queued wakes, handle that wake, then start the next checkpoint. - If the command prints
checkpoint:or exits 124 with no wake, drain queued wakes anyway, process any queued user message now visible to Codex, then start the next checkpoint. - Never use shell
&or Codex background tasks for firstmate watcher supervision. - Do not run
bin/fm-watch-arm.shas Codex's normal supervision command. If it is ever shelled anyway, a backgrounded, piped, or bundled anti-pattern is denied automatically by the PreToolUse seatbelt (bin/fm-arm-pretool-check.sh) registered in.codex/hooks.json.
Codex cannot reason while a foreground tool call is running. The bounded checkpoint returns control regularly so user messages and queued wakes can be handled without relying on background-task wake semantics.