Self-hosting the sandbox does not self-host the agent

A “self-hosted sandbox” checkbox feels reassuring. It suggests that the agent is back inside your boundary, running on infrastructure you control.

That may be true for the code it executes. It does not tell you where the session lives, who advances the run, how context is compacted, which service decides what happens next, or whether another runtime could resume the work.

The label answers one question: where does some execution happen? We often let it answer a much larger question about who owns the agent. That conclusion is usually ahead of the architecture.

This matters more now because agent APIs have grown beyond model endpoints. OpenAI describes its Agents API in terms of durable sessions, context compaction, tools, environments, and parallel subagents. The model call sits inside a harness that can preserve work and coordinate multiple steps. Once the harness becomes part of the product, “managed” and “self-hosted” stop being useful descriptions on their own.

A clearer description needs several boundaries, not one.

One agent has at least four deployment planes

For deployment purposes, I find it useful to split an agent system into four planes.

  1. The control and orchestration plane decides which step runs, when it runs, and what follows. It may schedule subagents, handle approvals, retry work, or stop a run.
  1. The durable state and context plane keeps the work record. This can include messages, plans, compacted context, snapshots, checkpoints, and the identifiers that connect one step to the next.
  1. The execution plane is where code touches a filesystem, starts a process, installs a package, or opens a network connection. A sandbox usually belongs here.
  1. The tools and data plane covers the systems the agent reaches: repositories, issue trackers, databases, browsers, internal APIs, and the credentials used to access them. Those systems also retain side effects that may outlive the agent session.

These planes can live in different places. A managed control service can coordinate a durable session while dispatching commands to a sandbox in the customer’s cloud. That sandbox can then call a third-party issue tracker and write to a repository hosted somewhere else.

Calling the whole arrangement either “cloud” or “self-hosted” hides most of the decisions that will matter during an outage, audit, migration, or security review.

Moving execution changes a lot, but it has a limit

A self-hosted execution environment is still a meaningful option. It can move responsibility for the filesystem, process lifecycle, network path, credentials, and isolation policy. Depending on the implementation, it may let a team place code execution near private services or enforce controls that a shared environment cannot express.

Those are substantial changes. They deserve precise credit.

They do not automatically move the session controller. The service that chooses the next action may remain managed. The compacted context may still be created or stored elsewhere. Tool policy can be split between the remote harness and the local environment. Model inference may have its own boundary again.

Arguments about whether a product is “truly self-hosted” tend to go in circles because people are pointing at different planes. One person means that shell commands run on company infrastructure. Another means that the company can operate the complete system without the vendor’s control service. Both definitions are understandable, but they describe different topologies.

Instead of debating a stricter slogan, name the plane that moved.

Visible state is not the same as portable state

OpenAI’s Agents SDK material describes externalized state, snapshots, and rehydration. Those concepts are helpful because they make the state lifecycle visible. A runtime can pause work, preserve a representation of it, and later reconstruct enough context to continue.

Visibility alone does not establish ownership or portability. A snapshot can exist without a documented export path. An exported record can use a format that only one runtime understands. Rehydration can mean restoring a session in the same service rather than moving it to another implementation.

The practical questions are more ordinary:

  • Who stores the state?
  • Which parts can the customer export?
  • Is the export documented and versioned?
  • Does it include tool results, approvals, and pending actions, or only conversation text?
  • What can read it without the original control service?

The answers may still support a managed design. Most teams do not need to operate every layer themselves. They do need to know which continuity claims their architecture can support.

Customer-controlled storage and cross-cloud options are appearing as explicit product choices elsewhere too. Anthropic’s enterprise announcement is one example. It does not imply that Anthropic and OpenAI use equivalent architectures. It shows a broader change in how these products are presented: placement and custody have become part of the product surface.

Putting those choices in product docs gives teams something more concrete to evaluate than a generic promise of enterprise readiness.

Interrupt the system on paper

A small interruption exercise exposes the topology faster than a long feature checklist.

Imagine a coding agent working through a durable managed session. Its workspace runs in a self-hosted sandbox. During the task, it reads an issue from a SaaS tracker, edits files, and opens a pull request. Now suppose the managed control service becomes unavailable after the edit but before verification.

Start with the work record. Can the team see the plan, the actions already taken, and the next intended step? If that record exists only inside the unavailable service, the local workspace preserves files but not necessarily intent.

Then inspect the workspace. Are the changed files still present? Can a developer identify the exact revision and continue manually? A durable filesystem helps, although it says nothing about the missing session record.

Next, inspect external side effects. The issue tracker may record a comment, and the repository may already contain a branch or pull request. Those effects belong to their respective systems. Restoring the sandbox does not rewind them.

Finally, inspect credentials and authority. Can another runner use the same grants safely, or were short-lived credentials issued through the unavailable control service? A locally running process is not useful if it cannot authenticate, but copying credentials into a second runtime may create a worse problem.

The exercise reveals what remains usable and where a handoff would need an explicit contract, even when seamless failover is not a goal. That is enough to distinguish a controlled boundary from a comforting label.

Keep a deployment map beside the architecture diagram

A useful deployment map can be short. For each of the four planes, record six fields:

  • owner
  • location
  • retained data
  • authority
  • export or handoff path
  • result when the plane is unavailable

The execution row might say that the platform team owns a sandbox in the company cloud. It retains a task workspace for seven days, can access a limited internal network, and exports a filesystem snapshot. If it fails, the managed session remains visible but cannot perform commands until another environment is attached.

The state row may look very different. A vendor could own the service, store compacted session context, and provide an application-level export that does not include every internal scheduling decision. If it fails, the workspace remains available while automatic continuation stops.

Neither row is inherently wrong. The value comes from seeing them together. A team can choose managed orchestration for convenience and self-hosted execution for placement without pretending it owns the complete runtime. It can also identify the one handoff path worth testing instead of buying an abstract promise of portability.

The map helps with product language too. “Self-hosted execution with managed orchestration and state” sounds less impressive than “self-hosted agent,” but it tells an engineer much more. Precise language makes the tradeoff reviewable.

Hybrid is a topology, not an apology

Hybrid agent infrastructure is often described as an awkward midpoint between a managed service and a fully local stack. That framing assumes the system should have one owner and one location.

Agent systems already cross boundaries. They coordinate work, retain context, execute code, and touch external systems. Splitting those responsibilities can be deliberate. A managed control plane may remove operational work that a team has no reason to own. A self-hosted sandbox may place execution where it needs to be. Customer-controlled storage may satisfy a separate requirement. The design becomes fragile only when the handoffs stay implicit.

A self-hosted sandbox can be exactly the right boundary without implying that the whole agent moved with it.

Teams can make the term concrete by naming the plane that moved, documenting its handoff, and checking what remains usable when one part disappears. Then “self-hosted” describes the architecture instead of a conclusion drawn from a checkbox.

Source notes

Comments

Popular posts from this blog

The Agent Shift Is Showing Up in Workflows, Not Prompts

The Invisible Wall of Vibe Coding: The Rise of Control Debt

Code Review Is Becoming a Routing Problem