OpenAI's Agents API Puts the Codex Harness in the Cloud, and the Data Rules Come With It
Last Updated: 2026-09-14
OpenAI has put the agent harness that powers Codex into the cloud: the new Agents API, in public beta since 10 September, runs sessions, orchestration, context compaction and recovery on OpenAI's infrastructure while your code supplies the tools and picks the execution environment. There is no platform fee, and the catch is territorial: data residency is United States only, with no Zero Data Retention option, even on a self-hosted sandbox.
What OpenAI Actually Shipped
What is the Agents API, in plain terms? According to OpenAI's launch post, it is the same harness and infrastructure that powers Codex, exposed to developers through an API in public beta: OpenAI hosts and maintains the agent loop, the part that coordinates model calls, tools and context, while the developer's application supplies tasks and receives events. The documentation builds the service around four concepts: an agent (the model, instructions, tools and MCP servers), an environment (an optional sandbox where the agent runs code and edits files), a session (a durable instance that works across turns), and the events and items flowing in and out. Because the underlying Codex harness is open source, the coordination logic itself is inspectable rather than a black box.
The environment choice is wider than the managed option alone. According to the launch post, a developer can run the agent in an OpenAI-hosted sandbox, on their own infrastructure, or through sandbox partners, and the announcement names nine of them, including E2B, Modal, Daytona, DigitalOcean, Oracle Cloud and Vercel. The hosted sandbox is configured with the agent's files, packages, skills and plugins, and OpenAI provisions and manages it.
What the Managed Harness Takes Off Your Hands
What does "OpenAI runs the loop" mean operationally? The documentation lists the harness's managed responsibilities, and they are the failure points that kill most home-built agents: running commands and code in a sandbox, applying skills and instructions, connecting to external data through tools or MCP, steering the agent mid-task, summarising previous work to keep the context window manageable, splitting work into subtasks for subagents, and resuming a session where it left off. Session state persists across turns, so a multi-day task does not have to be rebuilt into a fresh prompt each time, and sessions and published artifacts can be deleted when the work is done.
Anyone who has run an agent past a few dozen steps will recognise the shortlist. The loop drifting off task, the context window filling with stale tool output, a crashed run losing all its work: these are harness problems, not model problems, and they are exactly the parts OpenAI has taken over. The pattern is consistent with what the current release cycle keeps demonstrating, from Alibaba's review harness to Google's procedural graphs: the structure wrapped around a model decides how well the system performs.
What It Costs
Is there a new line item? No. According to the launch post there are no additional fees for the Agents API itself: usage bills at the selected model's standard API rates, OpenAI tools bill at their standard rates, and OpenAI-hosted sandboxes bill at standard container rates. The pricing documentation adds one operational detail worth knowing before the first invoice: container sessions are billed by the minute with a five-minute minimum per session, so an agent that spins up a sandbox for a trivial task still pays for five minutes of it.
The economics are unchanged from ordinary API use, which cuts both ways. Nothing is locked behind a new subscription, but nothing is capped either: a long-running agent loop makes many model calls, and the meter runs on every one of them. The compaction and summarisation the harness performs is partly a cost feature, because a managed context window is a smaller bill as well as a more reliable agent.
The Data-Residency Catch
Where is the catch, and who does it bite? According to the documentation, the Agents API currently supports data residency only in the United States and does not support Zero Data Retention, and choosing a self-hosted sandbox does not make the service ZDR-eligible. That last clause is the important one: moving the sandbox onto your own infrastructure does not move the session state, the orchestration and the context, which stay on OpenAI's side of the API.
For a developer prototyping on public data this is a footnote. For a business whose agent would touch client records, financial data or anything covered by a data-processing agreement, it is the deciding fact. The managed harness is genuinely attractive, and its conveniences are real, but a business whose agent would touch client records, financial data or anything covered by a data-processing agreement cannot sign the residency terms the managed route currently offers, and no amount of self-hosting changes that. Any owner evaluating this should start from the question the marketing does not answer: where does the data sit, and under what retention rules, on every turn of the loop?
The Way This Changes the Build-versus-Buy Question
What does a small business owner take from this? The cost of trialling a genuinely capable agent, one with sandboxed code execution, tool access and multi-day memory, has just dropped to the price of the model calls themselves, with the hardest engineering handled by the vendor. For the experiment stage, that is a materially lower fence than it was last week. The constraint that decides the production question is not capability or price but data governance, and on that axis the managed route currently accepts a trade, US residency and no zero-retention, that regulated and client-data-bound businesses cannot sign. The honest reading: OpenAI has made prototyping dramatically cheaper, and the production decision now turns on a single line of the documentation that has nothing to do with capability.
Sources
Tier A sources cited in this piece (the subject company's own statements about its own product):
- OpenAI, "Introducing the Agents API" (2026-09-10): https://openai.com/index/introducing-the-agents-api/
- OpenAI API documentation, "Agents API Overview": https://developers.openai.com/api/docs/guides/agents-api/overview
- OpenAI API documentation, "Pricing" (container session billing): https://developers.openai.com/api/docs/pricing
- OpenAI Developer Community, "Introducing the Agents API and hosted sandboxes" (2026-09-10): https://community.openai.com/t/introducing-the-agents-api-and-hosted-sandboxes/1396481