I investigated a Codex CLI 0.146.0 session after noticing frequent horizontal dividers, repeated “Interacted with /root/...” messages, and the model drifting into agent coordination for many hours.
The divider itself is harmless: the TUI displays it between tool activity and the next assistant message. It appears constantly because Codex is repeatedly alternating between agent activity and fresh model responses.
The underlying problem is wait_agent:
- It waits locally for a short timeout, commonly 30 seconds.
- A quiet timeout returns a successful
Wait timed outtool result. - Every tool result forces another model inference over the conversation context.
- The model often calls
wait_agentagain.
There is no harness-side re-arm, backoff, unchanged-state suppression, or maximum polling count. Mail from any child can also wake the parent, causing additional model turns.
In one affected 15-hour turn—after being told to focus on the main release task—I found:
- 855
wait_agentcalls; 559 were plain timeouts - 59 spawned agents
- 154 agent messages and 55 follow-up tasks
- 150 additional process waits
- 15 context compactions
- One streak of 47 consecutive agent waits
This can burn usage, bloat context and logs, trigger repeated compaction, duplicate work, and gradually replace the original task with agent/CI coordination.
The base polling flaw predates 0.146.0, but that release made Ultra’s proactive-agent mode durable across compactions, which may explain why recent long sessions sustain the behavior more aggressively.
Important detail: ultra and max both send maximum reasoning to the model, but only Ultra enables proactive delegation. high, xhigh, and max require agents to be requested explicitly. They can still hit the wait bug when agents are explicitly used; terminal-process polling can affect every effort level.
My current workaround in ~/.codex/config.toml is:
model_reasoning_effort = "max"
[features.multi_agent_v2]
enabled = true
wait_agent_enabled = false
max_concurrent_threads_per_session = 1The thread cap of 1 includes the root, so it disables subagents. Set it to 2 if you still want one explicitly requested child. Restart Codex and use a fresh thread after changing it.