Your sandbox stays home, your data still goes to the United States

Your sandbox stays home, your data still goes to the United States

On 10 September 2026, OpenAI opened the Agents API in public beta. It exposes, as a managed service, the harness that runs Codex: session orchestration, automatic context compaction, tool search, programmatic tool calling, parallel subagents, session resumption. The architectural point the announcement leads with is a decoupling. OpenAI hosts and maintains the harness, you choose where the compute runs, in an OpenAI-managed sandbox, on your own infrastructure, or with one of the nine announced partners: Blaxel, Cloudflare, Daytona, DigitalOcean, E2B, Modal, Oracle, Runloop and Vercel. There is no additional API fee, you pay for tokens, tools and the container.

That decoupling has been read almost everywhere as the answer to locality constraints: keep the sandbox inside your VPC and the question is settled. OpenAI's documentation says the opposite, in one sentence, at the bottom of the API overview page. The Agents API supports data residency only in the United States, does not support Zero Data Retention, and choosing a self-hosted sandbox does not make the Agents API ZDR-eligible. The sentence is written by the vendor itself, it is not an analyst's reading.

This is not a beta detail, it follows from the architecture, and it deserves to be understood before you rewire anything. The 1 July article argued that the harness, not the model, determines how an agent behaves. If that thesis holds, then outsourcing the harness is not an implementation trade-off, it is handing over the layer that decides. What remains is to work out what the transfer actually gives you, what it locks in, and on what terms it is worth it.

A local compute block linked by an outbound arrow to a larger remote orchestration block.
The compute stays with you. The session lives at the vendor.

What a self-hosted sandbox controls, and what it does not

The mechanism is documented precisely, which makes it possible to reason without guessing. OpenAI runs the harness. You run an executor, codex exec-server, inside your own environment. That executor runs shell commands, reads and writes files, and calls your local MCP servers, at the harness's request. It registers with the API using an environment ID and a restricted key, then opens a WebSocket connection to receive commands and return results. All connections are outbound, to api.openai.com for registration and to wss://codex-cloud-environments.chatgpt.com for the working traffic.

Read carefully, that diagram says your environment is an executor, not a decision maker. The harness decides which command to run, which tool to call, when to delegate to a subagent and what to keep from the context. Your side executes and returns the result. The result therefore crosses the outbound connection and lands at OpenAI, where the session is retained so work can resume across turns. That is the documentation's explicit promise: the Agents API retains session state so you can continue work across turns without rebuilding the conversation context, and you can delete sessions and published artifacts when you no longer need them.

Put differently, the self-hosted sandbox is a control over compute and files at rest, not a control over data governance in transit. Your files stay on your disk, your dependencies stay in your image, your environment secrets stay with you. But everything the agent reads and returns in order to make progress becomes session content on the vendor's side. For many workloads that does not matter at all. For a workload handling customer data in a regulated sector, it is exactly the question that matters.

The words behind this architecture

Harness: the layer that drives the agent around the model, picks the tools, manages context, coordinates subagents and decides when to stop. Most of the observed behaviour is settled here.

Executor: the process that actually runs the harness's commands in a given environment. Here, the codex exec-server command, launched inside your own infrastructure.

Compaction: the automatic summarisation of history when a session approaches the context limit, so the agent can keep working beyond a single window.

Data residency: the guarantee that customer content is stored at rest in a given region. Zero Data Retention: the commitment that requests and responses are not stored at rest at all. The two are distinct and are asked for separately.

The documentation sentence that cancels the sovereignty argument

The gap with the rest of the same vendor's platform is what makes this concrete. Since 25 November 2025, OpenAI has offered data residency in Europe, the United Kingdom, the United States, Canada, Japan, South Korea, Singapore, India, Australia and the United Arab Emirates, for ChatGPT Enterprise, ChatGPT Edu and the API Platform. On the API Platform, an enterprise customer approved for advanced data controls creates a new project, picks a region, and requests made through that project are handled in-region with no storage at rest on OpenAI's servers.

The Agents API sits outside that frame. Its overview page states that it supports data residency only in the United States and does not support ZDR, then adds the line that closes the usual escape hatch: choosing a self-hosted sandbox does not make the Agents API ZDR-eligible. A team that obtained European residency on its existing API projects therefore does not carry it across by migrating to the Agents API. The managed service is a different perimeter, with its own guarantees, weaker on this particular point as of writing.

That is the most useful inversion to take away from the whole launch. The announcement presents the environment choice as the main architectural decision, and it is right for compute, file storage, CPU and GPU configuration, cold-start time and cost. It is not right for the location of session data, which does not depend on that choice at all. Two questions that everyone is treating as one.

Two-column table contrasting what you decide with what the vendor decides.
What the environment choice settles, and what it leaves untouched.

Renting the harness also means renting its compaction policy

The managed harness summarises your history for you. The overview page explicitly lists, among its capabilities, summarising previous work to manage the context window, and the announcement specifies that the API automatically compacts earlier context as a session approaches its limit, so developers do not implement their own compaction logic. Presented as time saved, which it is.

Except that this layer is not neutral. The 5 September article documented it from academic work: on the ConstraintRot benchmark, 1,323 episodes across seven model families, the violation rate for a governance constraint goes from 0% with the policy fully in context to 30% after compaction, and up to 59% on some models. When the constraint survives the summary, violation stays at 0%. When it is dropped, it reaches 38%. The practical conclusion was that the context management layer is a governance surface in its own right, not a token optimisation setting.

Outsourcing the harness therefore hands that surface to the vendor. It is not necessarily a bad deal: a team writing its own compaction rarely does better than a vendor that has industrialised the question across millions of sessions. But it is a governance decision and should be taken as one, with an explicit counterpart. The Codex harness is open source and its public repository can be inspected, which makes the audit possible, on condition that you actually run it.

One point is worth flagging without over-reading it. The announcement promises versioned access to harness capabilities at each model launch, and a harness maintained and continuously improved alongside the models. The API documentation page, for its part, documents no mechanism for pinning a harness version: the only thing resembling a version number is the beta header OpenAI-Beta: agents=v1 used in the samples. Such a mechanism may exist elsewhere or arrive later. On what is published today, the question is worth putting to the vendor before committing, because a harness that shifts under your feet is an unversioned behaviour change on the layer that decides.

Five criteria to settle rent against build

The first criterion is the maintenance cost you remove. An in-house harness has to be reworked at every model change, and that work comes out of the budget that improves your product. It is the strongest argument in favour of renting, and it weighs more the smaller your team is. The figures OpenAI published point the same way, with an evaluation score moving from 0.71 to 0.85 at Ciridae, cost per case down 60% at SafetyKit and 86% fewer failed agent responses at Hypha. These are testimonials supplied by the vendor on its own product page, not independent measurements, and they read as such.

The second is location and retention. If your workload falls under a European residency or a non-retention requirement, the answer is written in the documentation and it is negative today, wherever your sandbox happens to run. This criterion is binary and it is assessed first, because it makes the other four moot whenever it blocks.

The third is control over compaction and context retention. Ask how summaries are logged, whether the content of a summary can be read back afterwards, and what happens to a policy constraint set at the start of a session. Without answers to those three questions, you will not be able to reconstruct an agent decision after an incident.

The fourth is portability and exit cost. The harness is open source, which makes bringing it back in technically possible, but session state, subagent configuration and published artifacts live on the vendor's side. Price what a repatriation would cost before you have agents in production, not after.

The fifth is subagent observability. Each subagent keeps its own context and the main agent coordinates. That is efficient and it is opaque: if your logs only keep the coordinator's output, you lose the trace of what each subagent actually did. On this point, the orchestration platform fragmentation covered on 30 August remains the right frame.

One last element, rarely mentioned, belongs in the grid. The self-hosted sandbox documentation asks you to isolate environments by user or by workload, because agents sharing an environment can access the same files, the same credentials and the same resources. An environment shared out of convenience is a silent bypass of everything you will have written elsewhere.

What to get moving this week

Open the Agents API overview page and read the retention paragraph to the end, with whoever owns compliance on your side and not only with the platform team. In practice, the decision to adopt an agents API is usually taken on integration speed, and the residency question surfaces six weeks later, raised by a lawyer who opens the page nobody had read.

Sort your agentic workloads into two piles before any technical evaluation: those handling data subject to a location or non-retention requirement, and the rest. The first pile is not a migration candidate today, whatever the measured performance. That separation takes an hour and prevents a pilot that could never reach production.

If you do test, test with the self-hosted executor rather than the managed sandbox, even when the managed one would be faster to stand up. That is the configuration that reveals the real operating load: environment key handling, reconnections, outbound hosts to allow, isolation by workload, container lifecycle.

Create the environment key separately from the application key, with every other permission set to None, and keep the application key outside the sandbox. The documentation notes that agent-generated code can read the environment key, and that this key only permits connecting environments. The separation is only worth anything if it is done on the first attempt, because it never gets retrofitted afterwards.

Put three written questions to the vendor before any commitment: is there a way to pin a harness version, is the session retention period contractual, and is the content of compaction summaries exportable. Answers beat an estimate, and the absence of an answer is itself useful information for the decision.

Conclusion

The Agents API is good news for most teams: it removes a layer that is expensive to maintain and it does so on an inspectable open-source base. But it moves the decision point rather than removing it, and the move is less legible than it looks. What you rent is not an execution service, it is the layer that picks the tools, splits the work and decides what to forget, with a session that lives in the United States even when the compute stays with you. The 1 July thesis does not fall, it turns around: if the harness determines behaviour and the harness becomes an off-the-shelf product, then what sets you apart is whatever remains on your side of the WebSocket, meaning your tools, your domain knowledge and your data.


Sources: As of September 2026