Summary
Codex is turn-driven and has no native primitive for waking an idle session on an external event. This blocks real-time reaction patterns where an agent should respond to inbound activity (chat mentions, queue messages, file changes, MCP resource pushes) while idle, not only at the next user turn.
Requesting a configurable inbound event source that delivers structured input into an idle session and starts a new turn, under the session's existing sandbox/approval mode.
Shape
A watcher declared in config (e.g. ~/.codex/config.toml) naming:
- source — process to spawn, file to tail, SSE URL, MCP resource, or local unix socket
- delivery — line-delimited JSON, each record injected as a user-message-frame equivalent (not as an exec-tool invocation)
- cursor — position that survives crash, reconnect, and session resume so events are neither dropped nor duplicated
- session scope — multiple Codex agents on one host can subscribe to disjoint streams without cross-talk
Lifecycle to specify
- idle session — wake triggers a new turn
- mid-turn arrival — queued, coalesced, or dropped (any choice, just defined)
- restart — cursor resumes from last delivered record
- shutdown — defined drain semantics
Non-goals
- Not asking Codex to host the bus, broker, or persistence layer.
- Not asking Codex to bypass approval/sandbox. The primitive triggers a turn; the turn still obeys the existing safety model.
Why
Claude Code exposes this via its Monitor tool: each stdout line from a watched process is delivered as a session notification and wakes the model. Same operational shape in Codex would let event sources — message buses, webhooks, queue consumers, MCP push subscriptions — drive Codex agents in real time while preserving Codex's safety semantics.
Concrete use case driving this: yaklog (https://github.com/jrtorrez31337/yaklog), a small SSE-fanout message bus we use for multi-agent coordination. Claude Code agents wire Monitor to tail -F events.ndjson and react to @mentions in ~500ms. Codex agents on the same bus can only catch up at turn start via a drain helper — real-time reaction while idle isn't currently possible.
Summary
Codex is turn-driven and has no native primitive for waking an idle session on an external event. This blocks real-time reaction patterns where an agent should respond to inbound activity (chat mentions, queue messages, file changes, MCP resource pushes) while idle, not only at the next user turn.
Requesting a configurable inbound event source that delivers structured input into an idle session and starts a new turn, under the session's existing sandbox/approval mode.
Shape
A watcher declared in config (e.g.
~/.codex/config.toml) naming:Lifecycle to specify
Non-goals
Why
Claude Code exposes this via its
Monitortool: each stdout line from a watched process is delivered as a session notification and wakes the model. Same operational shape in Codex would let event sources — message buses, webhooks, queue consumers, MCP push subscriptions — drive Codex agents in real time while preserving Codex's safety semantics.Concrete use case driving this: yaklog (https://github.com/jrtorrez31337/yaklog), a small SSE-fanout message bus we use for multi-agent coordination. Claude Code agents wire
Monitortotail -F events.ndjsonand react to@mentions in ~500ms. Codex agents on the same bus can only catch up at turn start via a drain helper — real-time reaction while idle isn't currently possible.