OpenCode and Codex on Managed Cloud Runners Compared to Rolling Your Own CI VM Strategy
Buy the runner unless your network needs demand building one.

To run Claude Code in the cloud without managing infrastructure, Anthropic’s Claude Code cloud is the official option, while managed platforms also support team workflows across agents. For OpenCode and Codex, managed runners versus self-managed CI VMs is a build-versus-buy decision. Teams that gain most from shipping code should buy the execution environment, while teams with time for platform engineering and specific network needs may gain more by building it.
Why running OpenCode and Codex locally stops working as agent workloads grow
Local execution couples an agent’s work to a developer’s machine. Fluence’s Cloud Agents documentation identifies three concrete problems with that arrangement. A session dies when the laptop lid closes or Wi-Fi drops, the agent sees the machine’s keys, repositories, and tokens, and concurrent agents compete for files, ports, and CPU. These are execution problems. A more capable agent does not remove the contention or narrow the credentials available to it.
OpenCode’s model-agnostic design makes that distinction especially clear. It has a permissive license and supports providers including OpenAI, Anthropic, OpenRouter, and local runners, so teams can change models without resolving the underlying host constraints. Multiple parallel tasks need separation, while an evening handoff needs execution that does not depend on someone leaving a laptop available overnight. Shared local hardware cannot reliably provide both, which turns an individual development tool into a team infrastructure decision.
How do managed cloud runners run OpenCode and Codex without infrastructure management?
Managed cloud runners take responsibility for provisioning, cleanup, and the execution lifecycle. In the VM-based model, each task runs in its own isolated environment, away from the developer’s working machine. The abstraction is useful, but not uniform. Platforms differ in network access, shell access, image customization, and integrations, and some use a different execution architecture altogether. Buying the environment therefore means accepting a particular operating model.
Netlify’s Agent Runners changelog records the addition of OpenCode on August 6, 2026, through a partnership with OpenRouter. That integration provides access to models including Kimi, DeepSeek, and GLM. Its retention policy is a concrete distinction. OpenCode requests go only to providers with a Zero Data Retention policy, under which prompts and outputs are never stored. That protection concerns model-provider retention and should not be treated as a description of every other part of the execution environment.
Fluence’s Cloud Agents documentation describes each agent as an OpenCode session in an isolated VM in the user’s account. Secrets, including the GitHub token, are stored in Vault, delivered as environment variables, and never returned by the API or shown in Console. The environment permits outbound connections only. An idle-hour setting shuts down the machine automatically, while billing covers machine time and tokens go to the user’s own provider account without a per-seat fee.
Cloudflare’s October 12, 2026 changelog describes an alternative through the experimental OpenCodeHarness for OpenCode 2.0. It runs OpenCode inside a Durable Object, stores sessions in SQLite, and uses Lifecycle jobs to resume interrupted work after eviction. Workers AI connects through the AI binding. This is not a per-task VM architecture, so the distinction belongs in the evaluation rather than disappearing under the label “managed.” Codex cloud has its own network policy, with internet access disabled by default during the agent phase and configurable limited or unrestricted access.
What rolling your own CI VM strategy actually requires
A self-managed VM gives a team control over its host image and execution environment. The simplest version runs a coding agent in tmux over SSH, with low compute cost and little abstraction between the team and the machine. That control has practical value for custom environments. The team still has to manage the server, keep concurrent work from clashing, and clean up after each run.
Concurrency exposes the limits of a shared server. Agents share files, credentials, CPU, memory, ports, and databases unless the team deliberately separates them. Each task needs a worktree and ports of its own. Even with those in place, one agent’s build can slow other tasks because file separation does not separate compute resources. Credential scoping is a further responsibility, rather than an automatic consequence of giving each agent a different directory.
An ephemeral CI pool provides a more substantial architecture. It creates a workspace, executes a task such as codex exec, and tears the workspace down afterward. This fits well-scoped work triggered by repository events. It fits less naturally when an exploratory task starts at 6pm and needs to continue until morning. Beyond the execution sequence, the team owns image updates, dependency caching, secrets rotation, stale-workspace cleanup, runaway-process monitoring, and network policies. DIY is legitimate infrastructure work, but its cost includes keeping that infrastructure dependable after the first successful run.
The five dimensions where the two approaches diverge most

Setup time is the first distinction between the approaches. Managed runners can be up and running within a session, while a production-grade ephemeral pool needs to be built and tested for isolation, secrets management, and cleanup before it takes on real workloads. A team with mature CI infrastructure may already have much of that foundation, whereas a team starting from a single VM does not.
Isolation is the second dimension, and the boundary needs a precise definition. VM-based managed runners separate tasks by design, while self-managed pools require explicit worktree separation, port allocation, and credential scoping. Shared directories are not the only risk. Incorrect separation can let tasks interfere with one another or expose secrets beyond their intended scope. A self-managed team can choose and enforce its own boundaries, but it also owns the work of establishing that they behave as intended.
Security is the third dimension and extends beyond isolation. The choice can change with the team’s needs for secrets delivery, network policy, data residency, and access to private services. Neither ownership model settles those questions alone. Fluence’s documented Vault delivery and outbound-only networking provide specific controls to evaluate, while Codex cloud’s default internet restriction illustrates a different policy choice. Self-management may be the right choice for teams whose needs a managed platform cannot meet, even if it costs more to meet those needs and keep doing so.
Parallelism is the fourth dimension because concurrent work changes capacity planning. Managed platforms scale horizontally within the platform’s limits, so the team does not have to manage the capacity behind them. A self-managed pool needs deliberate sizing. Too little capacity creates queues, while too much leaves paid VMs idle. The serverless harness offers another route for teams already on Workers, using persisted sessions and resumable jobs to avoid maintaining a team-sized VM pool.
Ongoing maintenance is the fifth dimension and persists after setup. Managed runners absorb work such as VM image updates, toolchain patching, cleanup, and monitoring. Self-managed teams retain both responsibility and control. That control can be valuable when the environment needs particular changes, but the associated work competes with other engineering priorities every sprint. The comparison is therefore between two allocations of ongoing operating responsibility.
How pricing models interact with the build-vs-buy math
Compute prices do not describe the whole economic choice. Workspace-minute and machine-hour billing connect infrastructure charges to the duration of execution, and sleeping workspaces do not accumulate active compute usage under that model. Idle capacity changes the comparison substantially. A provisioned self-managed pool has a floor cost while agents are not running, in addition to the engineering needed to build and maintain it. The entire bill needs to account for both usage-based compute and any plan commitments.
Model tokens form a separate cost category. Fluence bills for machine time, and token usage is charged to the user’s provider account, so the team can see the infrastructure and model charges separately. ACU billing is another model to understand and compare before deciding whether to reject a platform on that basis. Its billed unit needs to be mapped to the team’s actual tasks, runtime, and model use.
Usage patterns then determine where the break-even point falls. A small team that runs a handful of tasks each week may pay less for compute alone with a self-managed VM. Engineering time can reverse that apparent saving. For teams running many parallel agents daily, the work of maintaining isolation, capacity, and cleanup will typically erase the compute advantage. Existing platform capacity can shift the result again, because extending a maintained pool is a different investment from creating one expressly for agents.
Where self-hosting and hybrid approaches make sense despite the managed option
Private-network access is a concrete reason to retain control of the host. Codex remote devboxes over SSH, in alpha since April 2026, address this situation by letting the team control the image and retain access to internal services, corporate mirrors, and private networks. Even if a managed runner is easier to provision, it can only do the task if it can reach the service the task needs. Where code cannot leave the team’s network, deployment boundaries take precedence over convenience.
Existing CI infrastructure is another strong reason to consider self-management. A well-maintained, event-triggered pool may already match the tasks and have engineers available to extend it. The incremental cost can then be low. This is more persuasive for work with a clear definition of done than for long exploratory sessions. For teams already running on Workers, the serverless harness provides a third model that colocates agent execution with the application layer without adopting a conventional VM pool.
A team can use managed runners for new agent workflows while retaining self-managed VMs for CI-triggered work where the investment is already made. Not every workload needs the same home. The recommended point for evaluating consolidation is after three months of real usage data, when projected savings can be assessed against actual operation.
Applying the framework to your team’s infrastructure choice
Teams without people set aside for platform engineering should choose managed execution when agents need to work in parallel or on a schedule and the platform’s controls meet their compliance needs. Agent flexibility strengthens that case. Teams with available platform engineers, private-network requirements, or a mature CI pool should choose self-managed or hybrid execution when those assets make the incremental work worthwhile. The decisive distinction is whether operating the environment advances the team’s goals or diverts effort from them.
For teams evaluating agent-agnostic managed execution, Replicas is one option that gives OpenCode, Codex, Claude Code, or Cursor its own isolated Linux VM per task, accepts work from Slack, Linear, GitHub, or GitLab, and returns a pull request. Teams use their own model accounts and pay per workspace minute, with no charge while idle, so they can choose their model separately from the execution environment.
A trial should validate the boundaries before broader adoption. The team should test isolation between concurrent tasks, examine how secrets reach the environment and whether they appear in logs, and establish support for its existing triggers, including collaboration tools, repository events, and schedules. The team should run those tests on a platform it buys just as it would on its own internal pool. Where both approaches remain useful, the hybrid path provides a concrete starting point rather than delaying deployment until every workload fits one system.
The final acceptance test is the output itself. The unit of work should be a reviewable pull request that a human can merge, comment on, or send back. Whether an agent ran on a managed runner or a self-managed VM, its work should return to the team as a proposed change requiring human approval.


