OpenAI Codex Agent Harness Productized as Agents API

OpenAI launched Agents API, productizing the harness used in Codex. Developers can create production-grade agents that run for days with one API call. The API handles context management, tool calling, and multi-agent orchestration; developers define agent capabilities. Execution environment options: self-hosted sandbox, partner sandbox (Blaxel, Cloudflare, etc.), or OpenAI-managed sandbox (new, based on Codex infrastructure). Key harness capabilities: long session compression near context limit, tool search (lazy loading), programmatic tool calling, subagent parallelism. An interview with Codex team lead Thibault reveals the harness always leads model improvements: tools are removed as models internalize capabilities. Codex merged into ChatGPT Work mode for $20/month plan.
Key insights
Agents API Addresses Production Bottlenecks
OpenAI's Agents API solves two common problems: harness (context management, tool orchestration, multi-agent) and infrastructure (reliable sandbox for days-long runs). The API runs agent loops on OpenAI infrastructure while developers retain control over capabilities and environment.
Flexible Execution Environments for Enterprise Adoption
OpenAI offers three sandbox options: self-hosted, partner (Blaxel, Cloudflare, DigitalOcean, etc.), and new OpenAI-managed sandbox. The managed sandbox supports file injection, packages, skills, and plugins, matching Codex capabilities.
Harness Includes Long-Running and Multi-Agent Features
Key features: automatic context compression for long sessions spanning multiple windows; tool search for on-demand tool definitions (saves tokens); programmatic tool calling for parallel/chain/filter; subagent parallelism where main agent delegates tasks to parallel subagents with independent contexts.
Codex Team Lead Reveals Harness Evolves Ahead of Models
Thibault explained that the harness (tools/scaffolding) always 'walks ahead' of models. The team builds crutches (e.g., /goal command) which later become internalized by next-gen models. The latest model no longer needs /goal; it can be told to work for a week.
Codex Merged into ChatGPT Work Mode
A major engineering challenge unified the locally-run Codex with cloud-based ChatGPT. ChatGPT Work mode now runs the full Codex harness in a cloud VM, capable of training models, running Blender, etc., included in $20/month Plus plan.
Open-Source and Model-Agnostic Strategy
Codex CLI and SDK are open-source and support non-OpenAI models. Thibault reasoned that if not open-source, competitors would fork with minimal changes. The downside includes competitors copying features before release and handling low-quality PRs.