Codex, Behind the Harness — Dominik Kundel, OpenAI
Codex exposes several reusable harness patterns: deferred tools, persistent browser execution, sandboxed edits, automated permission review, WebSockets, and server-side compaction.
Codex’s open-source Rust harness caps skill descriptions at **2% of the context window** and defers some tools until search finds them. Since **GPT-5.4**, deferred tool loading is also available through the Responses API.
For custom coding agents, borrow the boundaries rather than rebuilding every mechanism: persistent execution for browser scripts, apply-patch for edits, OS-specific sandboxes, read-only review agents for escalations, and server-side compaction for long runs.
Codex’s open-source Rust harness caps skill descriptions at **2% of the context window** and defers some tools until search finds them. Since **GPT-5.4**, deferred tool loading is also available through the Responses API. For custom coding agents, borrow the boundaries rather than rebuilding every mechanism: persistent execution for browser scripts, apply-patch for edits, OS-specific sandboxes, read-only review agents for escalations, and server-side compaction for long runs. At **1,000 tokens per second**, GPT-5.3 Codex Spark made network round trips the bottleneck, motivating a persistent WebSocket mode. These details describe the current harness and API surface; both are expected to shift with later models.
This turns several broad harness recommendations into concrete Codex boundaries: budget skill discovery, defer tools, preserve execution, constrain edits with sandboxes and review, and compact server-side. It reinforces progressive loading, isolation, and long-run context controls in the candidates, while adding a latency consequence: once inference is extremely fast, connection architecture becomes part of agent performance. The mechanisms remain model- and API-version dependent.