Daily Edition Sources +9

Agent Runtimes Are Moving State Out of the Shadows

Recent Codex and Gemini CLI changes show coding agents treating settings, queued input, subagent starts, and terminal streams as explicit runtime state instead of invisible side effects.

repo openai/codex main
9 source signals 2 repos a668379
> a668379 / May 20, 2026 / Daily Edition

The quiet problem in a coding agent is not always what the model says next. It is what the runtime remembers, queues, inherits, and classifies between turns.

This week's watched changes point to that layer. In OpenAI Codex, turn settings are being moved into a queued ThreadSettings operation, pending model input is being consolidated into an InputQueue, subagent startup is getting its own lifecycle hook, and legacy subagent tools are being grouped under a namespace. In Google Gemini CLI, a new experimental flag controls whether subagent invocations go through the AgentSession protocol, while a nearby Windows PTY fix makes terminal output classification less brittle.

The common thread is state ownership. Agent products are becoming less like one prompt plus one answer and more like small operating environments. That means the runtime has to know which settings apply to the next turn, which input is waiting, whether a child agent is starting, and whether shell output is text or binary noise.

Codex turns settings into queued state

The sharpest Codex evidence is commit a668379, titled "Replace OverrideTurnContext with ThreadSettings." The commit adds Op::ThreadSettings for settings-only updates, emits a ThreadSettingsApplied event with the effective snapshot, routes settings-only updates through the same submission queue as user input, and deletes the old Op::OverrideTurnContext path.

That is more than a rename. The old name described a side-channel override. The new one describes durable thread state with ordering. For users, this is the difference between "why did the next turn change?" and "the thread settings changed before that turn started."

A companion Codex commit, afa0101, makes the input side of the same argument. Its summary says pending model input had been split across Session, TurnState, and the agent mailbox. The change adds session/input_queue.rs so turn-local pending input, next-turn queued items, and mailbox delivery coordination have one owner.

Subagents get clearer boundaries

Codex is also making child agents less implicit. Commit d661ab7 adds SubagentStart, a hook that runs when Codex creates a thread-spawned subagent and before the child sends its first model request. The hook input includes the child agent_id and resolved agent_type, and hook output can add context to the child conversation.

Another Codex commit, 05b8ce4, groups the v1 subagent tools under multi_agent_v1. The affected tool family includes spawn_agent, send_input, resume_agent, wait_agent, and close_agent. That change makes the model-visible surface less like a flat bag of helper functions and more like a named runtime subsystem.

Gemini shows the same pressure

Gemini CLI has a smaller but related signal in PR #26947. The merged change adds experimental.adk.agentSessionSubagentEnabled to configuration, stores it on the core Config class, and adds an isAgentSessionSubagentEnabled() getter. The documentation says the flag routes subagent invocations through the AgentSession protocol instead of legacy executors, with a default of false.

That is rollout plumbing, not a claim that every Gemini CLI subagent now uses the new path. But rollout plumbing is often where architecture becomes visible. It tells readers that subagents are being treated as session-managed work, not just function calls that happen to ask another agent for help.

A separate Gemini CLI commit, f09d45d, shows why this runtime layer matters even when no subagent is involved. The fix prevents Windows PTY output from being falsely treated as binary by stripping ANSI/VT escape sequences and using PTY-aware null-byte logic before shell output is classified.

The implication

The new agent frontier is not only better reasoning or more tools. It is whether the product can make its own runtime state legible. Settings need an order. Queued input needs an owner. Subagents need lifecycle boundaries. Terminal streams need classification rules that match how terminals actually behave.

None of these commits proves a shared standard is forming. They do show convergent pressure. As agents take longer tasks and coordinate more moving parts, hidden state becomes a reliability problem. The code is starting to answer by giving that state names, queues, hooks, and tests.

Watch next for whether these internal state surfaces become user-visible: a settings history, a queue inspector, clearer subagent traces, or diagnostics that explain when the runtime changed the next turn before the model ever saw it.

Letters & Corrections

Send a note to the desk

Corrections, missing context, or a follow-up lead.