September 27, 2026 · Ahmed · More by Ahmed
OpenAI's Agents API: The Sandbox Decision First
OpenAI's Agents API is in public beta with a managed Codex harness. Before adopting it, teams need to weigh the sandbox choice and two compliance limits.
On September 10, 2026, OpenAI released the Agents API in public beta: a managed Codex harness, available to all developers at no additional fee beyond standard token and tool usage. It's a distinct product from a plain Responses API tool-calling loop and from the already-shut-down Assistants API — it specifically targets teams that want OpenAI to own agent session orchestration, context compaction, and recovery, rather than building that machinery themselves.
What the managed harness actually takes over
OpenAI operates and maintains the harness on the developer's behalf, built on the same open-source Codex harness that powers Codex itself. The managed harness supports connecting to MCP servers and custom tools, programmatic tool calling, mid-session steering, and multi-agent orchestration — delegating subtasks to subagents through a documented max_concurrent_subagents setting. Sessions are durable: work can be resumed where it left off rather than rebuilt from scratch on every turn.
It's worth being precise about what's being introduced, though. A session, an Agents SDK session, a Responses API conversation, and a sandbox are described as four separate resources, each with its own state and cleanup rules — adopting the Agents API doesn't collapse these into one thing to reason about, it adds one more.
The environment choice is the first real decision
Every session needs an environment, and there are three types. An openai_hosted sandbox is fully provisioned and managed by OpenAI, running Python, Node, and CLI tools without any infrastructure to run yourself. A self_hosted environment runs on infrastructure the developer controls: you run codex exec-server inside your own environment, it registers using an environment ID and a restricted API key, and it connects outbound over WebSocket to receive commands and return results — no inbound access into your infrastructure is required. The third option, none, skips a sandbox entirely for agents that only answer questions or call external tools.
Self-hosted doesn't mean build-your-own from scratch, either: nine third-party providers have dedicated setup guides — Modal, Cloudflare, Vercel, Daytona, Blaxel, E2B, Runloop, DigitalOcean, and Oracle Cloud Infrastructure.
Two limits that matter before you commit data to it
The compliance-relevant catch: the Agents API currently supports data residency only in the United States, and does not support Zero Data Retention. Choosing a self-hosted sandbox does not change that — OpenAI states explicitly that it does not make the Agents API ZDR-eligible. For a commerce-automation pipeline handling customer records, order data, or anything under a regional data-residency requirement, that's a gating constraint to check before the environment-type decision even gets discussed, not after.
None of this makes the Agents API a bad fit — a managed harness that handles compaction, recovery, and subagent orchestration is a real reduction in undifferentiated work for teams building agentic automation. It just means the sandbox and data-handling questions belong at the start of the evaluation, not somewhere you discover them after wiring the tool-calling loop into a production pipeline.