Hands Off Development

Why Per-Task VM Provisioning Changes the Cost and Security Calculus for Cloud Agent Fleets

Destroying a VM after each task cuts idle compute and cross-task risk.

· 8 min read
Cover illustration for “Why Per-Task VM Provisioning Changes the Cost and Security Calculus for Cloud Agent Fleets”
Cloud Agent Environments · November 21, 2026 · 8 min read · 1,853 words

A bring-your-own API key cloud coding agent runner needs separate evaluation of model billing, execution isolation, and credential handling. Per-task VM provisioning gives each job a bounded machine lifecycle, making isolation and compute efficiency reinforce each other. For teams assessing how to run Claude Code or Codex in the cloud without managing infrastructure, the central decision is how the platform combines those controls.

What per-task VM provisioning actually means and how it differs from shared or persistent environments

Per-task VM provisioning assigns each agent job its own virtual machine or microVM, created on demand and destroyed or paused when the task ends. A microVM is a lightweight, hardware-virtualized machine. “Per-task” identifies the unit of provisioning, while “ephemeral” describes an environment whose lifetime is bounded. These terms describe different parts of the architecture. A machine can be virtual without being ephemeral, and an ephemeral workspace need not use a VM.

The distinction is in how the machine is managed. A plain VM can be rented once and left running as a persistent development environment. In the per-task pattern, an API creates the environment for a user or job, and the platform pauses it when idle or destroys it when finished. Its lifecycle is create, work, snapshot or pause, return or destroy. The task, rather than an ongoing machine reservation, anchors that lifecycle.

Cursor Cloud Agents run in isolated cloud VMs, while GitHub Copilot cloud agent runs tasks in an ephemeral cloud sandbox. Jules clones code into a virtual machine per task, and Devin uses dedicated cloud VMs with a workspace per task. Codex cloud gives each task an isolated workspace in a container. Those implementations are not interchangeable, even though each bounds the environment around agent work.

Why shared and persistent environments create security problems that isolation alone solves

Coding agents face a different threat model from human developers at a terminal. They read untrusted content at machine speed, hold real credentials, and can be manipulated by the text they process. A destructive command may be an accident. Prompt injection, data exfiltration, credential theft, and resource abuse introduce adversarial failure modes, so containing the blast radius is a structural requirement.

A shared or long-lived VM can retain artifacts, cached credentials, or modified state from one job and expose them to the next. Per-task destruction removes that path by construction. A compromised session cannot poison the next through residue in a machine that no longer exists. Pausing a machine, by contrast, is not the same operation as destroying its state.

Codex keeps network secrets replaced by a placeholder inside the VM and routes real credentials through an external proxy. Anthropic keeps real GitHub credentials outside the session VM, which holds only a short-lived scoped credential. Its proxy attaches the real credential server-side. The agent-readable environment therefore does not contain the underlying GitHub secret.

HarnessSecurity-Bench finds exploitable vulnerabilities in coding agent harnesses even when security mechanisms are present. Isolation does not eliminate those attacks or undo effects a compromised session has already caused outside its boundary. It limits their reach across tasks. That distinction separates a defensible containment claim from the much stronger, unsupported claim that an isolated agent is safe to trust with unrestricted authority.

How per-task provisioning restructures cost — and why the two bills are not the same problem

The same lifecycle that bounds a task also divides its operating cost into model inference and machine compute. These bills follow different clocks. Inference scales with token consumption, while compute scales with active VM time. Treating them as one undifferentiated agent charge obscures which part of the system is responsible for spending and which configuration can change it.

Agents re-read their context at each step, so a heavy session can use a lot of cached input while producing little output. Model selection is the primary lever on this bill. Ending a machine reservation cannot bring back tokens already used.

The compute bill responds directly to per-task provisioning. A machine destroyed at completion or paused while idle stops accruing active compute charges during that idle interval. A persistent environment keeps charging whether the agent works or waits. This distinction becomes useful when jobs arrive intermittently. The architectural saving comes from matching paid machine time to active work, rather than from assuming that isolation makes execution itself free.

Devin’s ACU pricing creates a different purchasing calculation. Its headline price is a floor, and a mid-complexity feature can consume a large number of ACUs, with a substantial premium over token-billed alternatives. That premium buys autonomy, with fewer prompts and less need to oversee the agent as it works. Teams that have mapped this trade-off tend to use token-billed agents for the majority of tasks and ACU-priced agents for well-defined autonomous work. The comparison is therefore partly about how much human supervision the price replaces.

What changes when agents run in parallel rather than one at a time

Each simultaneous job gains its own containment boundary, but token quotas and compute minutes are consumed concurrently. For comparable workloads, subscription quota consumption scales linearly with concurrency. Per-task compute also scales with concurrent activity, although its billing clocks stop between jobs instead of accumulating idle time across persistent machines.

In Draper’s workflow, work enters through Slack and is filed into Linear, with a per-worktree agent pipeline and a parallel CI path. An “AI: Claude” label triggers the cloud workflow, which checks out staging and hands the ticket to Claude Code running in CI. Claude opens a draft PR and comments its link back on the ticket.

Ramp demonstrates the output side of that arrangement. It built Inspect on OpenCode, Modal, and Cloudflare to connect specifications, customer feedback, and code, with agents writing a large majority of merged pull requests. That output depends on parallel execution, which lets the fleet get more work done at once without each session getting faster.

Linear’s internal agent workflow applies the same principle to triage. It resolves roughly a third of incoming bug reports before they reach an engineer, mostly on the first pass. Taken together, these workflows show why concurrency requirements depend on the work being admitted to the fleet, while spending depends on how much of that work is active at once.

How the network boundary and secret handling at the VM layer prevent the cost of a security incident from erasing efficiency gains

A security incident can overwhelm savings from avoiding isolation. Exfiltrated credentials, compromised repositories, and cross-task contamination can trigger remediation, audit, and downtime costs that dwarf the compute saved. The network boundary therefore protects the economic model as well as the code. It governs whether a manipulated agent can turn access inside its environment into an effect outside it.

Cursor documents internet access enabled by default with allowlist modes, while Copilot documents a firewall that administrators can customize or disable. Codex documents an internet toggle and allowlists. Its HTTPS network secrets are tied to allowed domains, with substitution working only for HTTPS on port 443.

Secret redaction is a control distinct from credential isolation. Cursor separates environment variables, runtime secrets, and build secrets, with runtime secrets redacted from tool call results, transcripts, commits, and commit messages. Devin describes redaction in transcripts and command output. Neither description alone establishes that an agent cannot read a credential. The exposure surface depends on where the real secret resides and which component can use it.

“Don’t Trust the Code, Check Its Effects” argues that generated code should lack authority to act directly, leaving a trusted mediator to validate and execute effects against a specification. Buildkite’s Cleanroom expresses this pattern through deny-by-default egress and a credential proxy. The boundary still needs organizational coverage. Individual adoption of Cursor, Claude Code, and GitHub Copilot has outpaced organizational controls, so a sanctioned fleet’s protections do not cover agents running elsewhere on unreviewed infrastructure.

What enterprise and regulated-industry teams require beyond basic per-task isolation

SOC 2 Type II certification, SAML SSO, granular administrative controls, and deployment options that keep code off vendor infrastructure can be prerequisites for using a platform. These requirements address questions that an ephemeral VM cannot answer. Isolation sets the boundary around where code runs, while enterprise controls govern who has access, who oversees the work, and where it is allowed to run.

Brex illustrates the deployment constraint directly. Its financial infrastructure code cannot be piped through a third-party cloud, making the location of execution a blocking condition. A self-hosted path removes the question of code residing in a vendor VM. Stronger isolation within that vendor’s infrastructure would not resolve the original restriction. The acceptable topology must therefore be established independently of sandbox strength.

A bring-your-own-key arrangement cannot, by itself, answer whether the execution environment meets a team’s deployment requirements. The platform must fit both how the team buys it and where the team is allowed to run it before ease of use can matter.

SCIM, audit logs, and self-hosting are further needs that set working with an enterprise platform apart from buying a product. Engineering teams at scale need those controls built in. They support governance after a task ends and its machine disappears, when the organization still needs to manage the fleet and account for its work.

How to size a cloud agent fleet when isolation, cost, and governance requirements are all in play

Fleet sizing starts with whether each work unit receives its own environment, what primitive provides that boundary, and whether completion destroys state or merely pauses execution. That establishes what containment the fleet actually provides. Credential isolation and network controls then determine which external resources a session can reach, rather than leaving the VM boundary to stand for protections it does not supply.

Concurrency must be assessed against a defined quota and compute budget. Under a subscription model, parallel agents use tokens from the same pool. A compute-billed model exposes each task’s machine cost independently, but does not remove the separate inference bill. The sizing decision should distinguish active machine time from token demand. Otherwise, a fleet can fit its compute budget while exhausting its model allowance.

Work arriving through Slack, Linear, GitHub issues, or monitoring alerts from Sentry and Datadog fits the event-driven provisioning model when it returns a reviewable pull request. The work unit is bounded by an output. That makes the work a better fit for task-based execution than an open-ended session with no clear end, and ties expected concurrency to the workflows that bring in jobs.

Governance questions about required audit logs, SCIM, credential isolation, and self-hosting options constrain the viable configuration before platform selection. Answering these questions later can force rearchitecture. For a bring-your-own API key runner, the useful comparison is therefore not key acceptance alone, but how model billing, task compute, containment, and organizational controls fit the intended workload.

The reviewable pull request is the right unit of work at fleet scale. A human can merge it, comment, or send it back without reconstructing every action taken inside the VM. That decouples output review from the execution environment. The machine can remain disposable while the decision to accept its work remains governed, allowing the fleet’s cost and security model to serve the same bounded task.

Sources

  1. HarnessSecurity-Bench: Do Security Mechanisms Really Protect Coding Agent Harnesses?
  2. List of coding agent sandboxes 2026-05 · GitHub
  3. Don't Trust the Code, Check Its Effects: Runtime Refinement for Regenerated Systems Code Under an Adversarial Generator

More in Cloud Agent Environments