OpenAI Opens the Codex Harness via Agents API
On September 10, 2026, OpenAI released the Agents API in public beta, giving any developer managed access to the same agent harness and execution infrastructure that runs Codex. The API handles long-running sessions, sandboxed tool execution, MCP connections, and subagent orchestration so developers don't have to build that plumbing themselves, and there is no separate fee beyond normal model, tool, and container usage. It reached the front page of Hacker News with 338 points and 178 comments within hours of launch.
Key Takeaways
- The Agents API gives any developer managed access to Codex's own execution harness, sessions, sandboxes, MCP tools, and subagent orchestration, without building that infrastructure in-house.
- Work is organized around four primitives, an agent, environment, session, and events, with OpenAI handling context compaction and multi-day session recovery automatically.
- Developers can execute agent work in an OpenAI-hosted sandbox, their own infrastructure, or a partner environment from Blaxel, Cloudflare, E2B, Modal, or Vercel.
- There is no separate Agents API fee; usage is billed entirely through the underlying models, tools, and containers a session consumes.
- The Hacker News announcement thread hit 338 points and 178 comments, with much of the discussion focused on vendor lock-in versus building an orchestration layer independently.
- The current beta is US-only for data residency and does not support Zero Data Retention, a real constraint for regulated workloads considering the API.
Sources & Mentions
3 external resources covering this update
A Hosted Version of the Codex Harness
On September 10, 2026, OpenAI released the Agents API in public beta, opening up the same agent harness and execution infrastructure that runs Codex and ChatGPT Work to any developer with an API key. Rather than assembling the sessions, sandboxes, and orchestration logic that a reliable long-running agent needs from scratch, a developer can now send work to OpenAI's managed version of that harness over HTTP and let OpenAI run it.
What the API Handles
The Agents API organizes work around four building blocks: an agent (a model plus instructions, tools, and MCP servers), an environment (an optional sandbox for file access and command execution), a session (a durable object that persists state across turns), and events. OpenAI's managed layer takes care of context compaction so long tasks do not blow through a context window, coordinates subagents for work that can run in parallel, such as checking incident telemetry or reviewing independent parts of a codebase, and keeps a session alive and recoverable across days of unattended work.
Sandboxes and Pricing
Developers choose where the agent's code actually executes: an OpenAI-hosted sandbox, their own infrastructure, or a partner environment from providers including Blaxel, Cloudflare, E2B, Modal, and Vercel. There is no separate charge for the Agents API itself; usage is billed through whichever models, tools, and containers a session consumes. OpenAI's documentation currently limits data residency to the United States and does not support Zero Data Retention, a constraint that will matter for regulated workloads.
Early Reception
The launch drew immediate attention from developers already building on Codex's harness: the Hacker News discussion of the announcement reached 338 points and 178 comments within hours, with much of the conversation centered on vendor lock-in concerns and how the API compares to building an agent orchestration layer independently. Coverage from MarkTechPost and The New Stack both framed the release as OpenAI turning years of Codex-specific harness engineering into a general-purpose product, noting that OpenAI's own research team had been spending roughly $7,000 a day running agents internally before opening the same infrastructure to outside developers.