METAL

OpenAI opens the Codex harness as an API

The Agents API hands OpenAI the runtime that drives Codex, and it is now in public beta. Sessions and context management become OpenAI's job while your application only picks tools and an execution environment, though the data still sits in the United States alone.

OpenAI opens the Codex harness as an API

Image: METAL

Summary

  • OpenAI released the Agents API in public beta on September 10. It exposes the Codex harness as a managed service, with OpenAI handling sessions, orchestration, context compaction and recovery.
  • There is no additional fee. You pay only for the tokens and tools your agents actually use, and nine partners including Cloudflare, Oracle and Vercel offer execution environments for teams that want to run sandboxes on their own infrastructure.
  • Data residency is supported only in the United States, and Zero Data Retention is not available. Choosing a self-hosted sandbox does not make the API ZDR-eligible, the documentation states flatly.

OpenAI has opened up the runtime that drives Codex. Announced on September 10, the Agents API hands applications the Codex harness as a service that OpenAI operates on their behalf, and it is available in public beta to every developer. The company says it takes on sessions, orchestration, context compaction and recovery, leaving applications to choose only their tools and their execution environment.

Any team that has built an agent knows where the difficulty lives. Calling the model is the easy part; everything around it is not. You need an execution layer that can understand a task, hold context, call tools, handle failures, pause for human approval and pick the work back up. OpenAI calls that layer the harness, and says the Codex app, the command-line tool and the IDE extension all run on the same one.

Open the documentation and the product turns out to rest on just four concepts: an agent that bundles a model, instructions, tools and MCP servers; an environment that reads files and runs commands; a session that carries work forward; and the events and items that move through it. Create a session and OpenAI provisions the environment. Send a task and a turn begins. Progress arrives by streaming or webhook, and you can queue the next task in the same session or steer the agent mid-turn.

The managed harness also spells out what it will do for you. It runs commands and code in a sandbox, applies skills and instructions where they fit, reaches external data through tools or MCP, changes direction mid-task, summarizes earlier work to manage the context window, breaks work into subtasks for subagents, and resumes a stopped session where it left off. The official example sets the model to GPT-6 Astra and caps concurrent subagents at four.

Pricing is simple. OpenAI says there is no additional fee for the Agents API itself and that you pay only for the tokens and tools your agents actually consume. Sandboxes hosted by OpenAI bill at standard container rates, and for teams that would rather run on their own infrastructure, the company says it has lined up execution options with nine partners: Blaxel, Cloudflare, Daytona, DigitalOcean, E2B, Modal, Oracle, Runloop and Vercel.

The claim that the harness is what produces the score already has numbers attached. According to OpenAI's developer documentation, two settings alone, retained reasoning and context compaction, lifted GPT-5.6 Sol's ARC-AGI-3 score from 13.3% to 38.3% while cutting output tokens to a sixth. METAL has reported on how far those same harness settings carried Astra's score, and this API is the product that lets other people's applications use them.

Early users put figures on the effect. Jack Weissenberger, CTO of Ciridae, said that "with the Agents API, our evaluation score went from 0.71 to 0.85," adding that "previously it was pretty cumbersome to observe and orchestrate subagents in our old setup but the new APIs gave us a 4x latency reduction." Bhavyansh Sabharwal, a member of technical staff at SafetyKit, wrote that after moving its case-review workflow across, cost per case fell 60%, latency dropped and token efficiency improved markedly.

Other teams pointed to the architecture itself. Serhii Shchoholiev, lead engineer at Hypha, said that "earning customers' trust is critical in financial services" and that "by separating the agent harness from the sandbox, we reduced failed agent responses by 86%." Aziz Alghunaim, co-founder and CTO of logistics company Nash.ai, explained that long-running agents managing hundreds of millions of deliveries need a durable layer for sessions, recovery and multi-step execution.

Embedding the Codex harness inside a product has already moved beyond coding. According to OpenAI's developer documentation, Thrive Holdings and Crete put Codex into tax-return preparation and processed 7,000 returns in a pilot, cutting preparation time by about a third. The company recommends placing the agent inside screens people already look at, such as a security analyst's investigation queue, a support engineer's account history or a product team's task board, and published five example applications covering incident response, a Slack bot, data analysis, GitHub issue investigation and document review.

The limits the company set down for itself are in the same documentation. The Agents API currently supports data residency only in the United States and does not support Zero Data Retention. Putting the sandbox on your own infrastructure does not make it ZDR-eligible, the documentation states flatly. For any organization that has to settle where data lives and for how long before anything else, that single line decides whether the product is adoptable.

From an engineer's seat, the heart of this announcement is not the feature list but the boundary. Of the things teams used to decide for themselves, when to summarize context, which work to split off to subagents and which actions require human approval, the first two move to the platform. Hand them over and you write less code, but you also have fewer dials to turn, and the layer you can inspect when an agent misbehaves sits one step further away.

OpenAI has softened that cost by keeping the harness open source. The company says it publishes the Codex harness, the command-line tool, the app server and the official SDK in public repositories so developers can inspect and adapt the layer that sits between their application and the model. That means a team hitting the limits of the managed API can run the same harness on its own infrastructure, which makes the lock-in weaker than a managed service usually implies.

METAL read the official documentation, and it is explicit about what a company building agents still has to hold. OpenAI takes sessions and recovery; the application keeps its tools, its screens and its approval flows. What distinguishes an agent product from here on is no longer how well you write the loop, but which tools and which approvals you attach to it.

Comments