Skip to content

Build1 publisher3 min readPublished

A self-hosted sandbox on OpenAI's Agents API still forfeits Zero Data Retention

OpenAI's Agents API, in public beta since September 10th, runs the Codex harness on OpenAI's own infrastructure. The documentation says data residency is US-only and Zero Data Retention is unsupported, whichever sandbox you pick.

The Engineer · Build desk

Illustration accompanying A self-hosted sandbox on OpenAI's Agents API still forfeits Zero Data Retention

What happened

  • OpenAI launched the Agents API in public beta on September 10th, putting the harness and cloud infrastructure behind Codex into a managed service for long-running agents.
  • The Agents API documentation says the service currently supports data residency only in the United States and does not support Zero Data Retention.
  • OpenAI said in June that Agent Builder and its Evals products would be removed from the platform after November 30th, pointing code-based workflows at the Agents SDK.

Compiled by The EngineerSomething wrong?How this is made

Why it matters

  • constraint Teams under retention or residency rules cannot adopt the managed harness at all today, however good the compaction and tool-search behaviour turns out to be on their workload.
  • decision Teams that wrote their own agent loops now have to say which specific failure the loop handles that the managed harness does not, and context overflow and tool-schema bloat are no longer on that list.
  • exposure An agent that installs packages in the hosted sandbox can reach the network unless someone writes the template policy that stops it, so the default puts outbound egress in scope for whoever reviews the config.
  • precedent OpenAI has drawn the line so that the sandbox is negotiable and the session path is fixed.

OpenAI says one API call creates an agent, and its launch example shows what the call configures: a model, an MCP server connection, as many as three concurrent subagents and an OpenAI-hosted environment [4]. After that, the service coordinates model calls, tool use and context while the agent works, with the developer supplying the task, the model, the tools and the execution environment [2]. The OpenAI Developers account said the company will handle orchestration, long-running sessions and context management [3].

The parts of the loop worth reading closely are the ones that manage the context window. The harness can compact earlier context as a session approaches its limit, preserving selected information so work continues across multiple context windows [6]. Tool search loads relevant tool definitions when they are needed instead of holding every schema in the prompt, and programmatic tool calling can run operations in parallel and filter results before they reach the model's context [7]. A main agent can break a task into separate assignments for subagents running with their own context, then coordinate the results [8].

In my experience those are the failure modes a hand-written loop hits first: overflow at the limit, and tool definitions crowding out the work. If that is why your loop exists, this API is a real substitute and you should price the migration.

If your loop exists for data-handling reasons, the documentation answers the question for you. The Agents API supports data residency only in the United States and does not support Zero Data Retention [12]. Self-hosting the sandbox moves code execution and files into your own infrastructure or VPC [21], but OpenAI says that does not make the workload eligible for Zero Data Retention [13]. OpenAI operates the model-facing loop either way [21].

The execution choice itself is genuinely open. Code can run in an OpenAI-hosted sandbox, on your own infrastructure, or through an integrated sandbox provider [9], and OpenAI named nine launch partners: Blaxel, Cloudflare, Daytona, DigitalOcean, E2B, Modal, Oracle, Runloop and Vercel [10][11]. Available configurations vary by provider and include different CPU, GPU, memory, file-storage and secret-storage options [20].

Read the hosted sandbox defaults before you plan around them. It can run code, install packages, work with supplied files and produce artifacts [14]. Network access is enabled by default unless a template policy changes it, and developers can disable outbound access or restrict it to an allowlist [15]. Files remain available across turns while the sandbox exists, and completed output artifacts remain downloadable after the sandbox expires [16]. An inactive hosted sandbox can be deleted after one hour [17]; the documentation does not define what counts as inactive, or when in that hour the deletion happens.

For the managed harness to be worth adopting, the compaction policy has to keep the information your task needs, and OpenAI's choice of what to preserve has to match yours. The documentation says it preserves selected information [6].

This continues a direction OpenAI set in April, when it added native sandbox execution and a more capable harness to the Agents SDK while leaving developers responsible for operating the agent process [18]. In June, OpenAI said Agent Builder and its Evals products would be removed from the platform after November 30th, directing code-based workflows toward the SDK [19].

What to watch

  • Whether OpenAI adds Zero Data Retention support or non-US data residency to the Agents API.
  • Whether the three-subagent concurrency in the launch example is a documented ceiling or just an example.
  • Where code-based workflows land after Agent Builder and Evals are removed from the platform following November 30th.
Loading claim ledger
Loading source directory links
Loading share composer
Loading topic controls
Loading related stories