Request an evaluation(opens in a new tab)

November 9, 2026 / 6 min read

The Cheapest Agent Environment Can Be the Most Expensive

A coding agent’s infrastructure bill is only part of its cost. When an agent cannot reproduce a bug, run the application, or verify a fix, the work often returns to an engineer. A cheaper environment can therefore make a task more expensive to complete.

At LogicStar, we give agents prepared environments with the tools, services, and realistic data they need to work independently. These environments can cost more to run and maintain, but reduce the need for human intervention and the risk of incorrect changes.

Summary

  • At LogicStar, autonomous agents drive over 60% of merged PRs. Stripe and Cursor report similar progress with environments that mirror how their engineers work.
  • Reproduce the real-world behavior relevant to the task so agents can test their changes and verify the result.
  • Provide broad, safe capabilities so missing tools or services do not block progress, without tailoring an environment to every task.
  • Give agents freedom within their workspace while strictly controlling what they can access or affect beyond it.
  • A more capable environment can cost more to run and maintain, yet reduce total task cost through less human intervention and fewer incorrect changes.

Operational Capability

“Even the best mechanic can't fix a car with nothing but a screwdriver.”

An execution environment is the workspace in which an agent runs, including its compute resources, tools, services, and permissions to interact with external systems.

Setting up a proper execution environment boils down to empowering your agent. Consider a bug report stating that a former group member can still download a CSV. An agent with only access to the source code can inspect the download handler and suggest a fix, but actually reproducing and verifying the bug requires more. The agent needs a running application, a database to manage user permissions, and a task queue with workers to process exports. It must queue an export, save the download link, revoke the member’s access while the job is pending, and let the worker finish. This lets it verify that the link works before the fix and returns a 403 afterward, without breaking downloads for authorized members.

At LogicStar, we use several tiers of agent workspaces. The most capable tier replicates the exact Linux VM setup our engineers use, with local replicas of key services and databases preloaded with realistic synthetic data. By providing a broad set of safe capabilities, even when an individual task does not require them all, we reduce the chance that a missing tool or service blocks progress or compromises quality, without tailoring an environment to each task. Agents can reproduce bugs, test fixes, and verify the results independently. The setup includes restricted browser access, web search, and a virtual desktop. If a run needs human intervention, an engineer can connect to the same VM and pick up the task. With these environments, over 60% of merged PRs are fully agent-driven.

Other companies have reported similar success with capable agent environments. Stripe’s agents use the same development environment as its engineers and produced more than 1,300 merged, human-reviewed PRs per week in February 2026. Cursor adapted its cloud environments to match local development and reported in July 2026 that cloud agents authored more than half of the PRs merged into its monorepo, up from roughly one in ten in December 2025.

For lighter tasks, we use containers, which start quickly and require fewer resources. Our custom execution runtime supports both containers and VMs, with controls over resource use and network access. VMs give agents access to a broader range of Linux kernel features and allow us to snapshot and resume environments. Within their workspace, agents can start and manage containers for services such as databases and task queues.

Security

“With great power comes great responsibility.”

As discussed above, the more capabilities we give agents, the more work they can accomplish autonomously. But these same capabilities can become a liability if an agent goes rogue, whether through a mistake, malicious code, or prompt injection. The challenge is to give agents as much freedom as possible within their sandbox, while strictly limiting what they can access or affect outside them. We approach this through three security boundaries: isolation, authority, and connectivity.

Isolation determines how effectively an agent's execution environment is separated from the host and other agents. Containers share the host kernel, creating a trade-off between the system capabilities exposed to agents and the host's attack surface. VMs largely decouple the two by giving agents their own kernel, with the hypervisor providing the security boundary. This allows agents to have root access and broad Linux capabilities without granting equivalent privileges on the host. Each agent runs in a separate environment, limiting interference through local files and processes. Access to shared systems is controlled separately.

Authority governs what an agent can do beyond its workspace. For example, an agent may need to push code to GitHub, but it doesn't need the underlying GitHub credentials. At LogicStar, the host brokers access to key services, including our private repositories, keeping credentials outside the environment and allowing us to enforce permissions on individual operations.

Connectivity controls which systems an agent can reach and where it can send data. Agents need network access to install dependencies, search documentation, and interact with external APIs. Unrestricted connectivity creates risks of data exfiltration and unauthorized access to internal services. We enforce network policies that restrict outbound destinations and isolate internal infrastructure, while preserving the connectivity agents need to work. The behavior of certain external services, such as cloud providers, can be difficult to reproduce locally. Where local replicas are insufficient, agents can use the real service in isolated test projects with strictly enforced access boundaries.

Platforms

The previous sections established two requirements for a software factory: agents need sufficiently capable environments to complete tasks autonomously, while remaining isolated and restricted in what they can access outside their workspace. The challenge is to provide these environments consistently and at scale, without having to build and operate all the underlying infrastructure ourselves.

Execution platforms help by providing APIs to provision and manage containers or VMs, prepare reusable environments, and control their lifecycle. The main trade-off is between control and operational complexity. Self-hosting offers greater flexibility over infrastructure and security boundaries, but requires managing provisioning, capacity, and maintenance. Managed platforms handle much of this work, potentially at the expense of flexibility.

Platforms also differ in how they support the capabilities and security controls discussed above. Features such as prebuilt images, snapshots, and nested virtualization determine what agents can do, while isolation mechanisms, network restrictions, and credential injection determine how securely they can operate. Remote desktop access also allows engineers to inspect or take over running environments when needed. The availability of these features determines how much additional integration work a software factory requires.

The table below compares four platforms based on these considerations. Coder and E2B have maintained open-source cores, while E2B, Modal, and Daytona offer managed hosting.

CapabilityCoderE2BModalDaytona
Maintained open-source core✓ AGPL-3.0✓ Apache-2.0——
DetailsThe historical OSS repository is unmaintained; current core development is private.
Managed hosting—✓✓✓
Run on our infrastructure✓✓—◐ BYOC
DetailsOur compute with Daytona’s hosted control plane; requires enablement.
Execution technologyContainers / pods / VMsFirecracker VMgVisor / VM
DetailsThe VM runtime provides its own Linux kernel.
Containers / VMs
Environment definitionTerraform + imagesImages + SDK recipeImages + SDK recipeImages + SDK recipe
DetailsVM environments launch from prepared snapshots; direct Dockerfile/SDK builds apply to containers.
Prepare dependencies ahead of runs✓ Images✓ Templates✓ Images✓ Images / snapshots
Run Docker / Compose✓✓✓ VM runtime✓
Create / delete through API or SDK✓✓✓✓
Save / restore memory and processes—
DetailsRequires a separate integration with the chosen VM backend.
✓◐ Memory snapshots
DetailsThe memory snapshot feature has restrictions on active commands and process restoration.
✓ VM runtime
Fork memory and process state—✓◐ Memory snapshots
DetailsRestoring a memory snapshot creates a clone of the Sandbox. Process-restoration restrictions apply.
✓ VM runtime
Nested virtualization inside environment✓
DetailsThe selected infrastructure must expose virtualization extensions to the environment.
—
DetailsE2B’s self-hosting requirements concern KVM on the host; they do not establish nested virtualization inside an agent’s environment.
✓ Enterprise · VM
DetailsNested virtualization requires the Enterprise plan and an experimental nested-virtualization flag on a VM Sandbox.
✓
DetailsLinux VMs can expose /dev/kvm; Daytona must enable this for the organization.
Human command-line accessWeb terminal / SSHWeb terminal / SSHSDK / CLIWeb terminal / SSH
Human remote desktop✓ VNC integration✓ Desktop template✓ VNC recipe
DetailsModal provides a desktop setup example.
✓ VNC
Built-in desktop automation✓
DetailsRequires Coder’s virtual desktop integration.
✓
DetailsDesktop SDK
—
DetailsIntegrate external automation tools.
✓
DetailsComputer Use API
Outbound network restrictions✓
DetailsConfigure infrastructure-level policies; Coder also offers a Premium process firewall.
✓✓
DetailsSupports domain allowlisting.
✓
DetailsPer-environment overrides depend on tier.
External HTTPS credential injection—
DetailsNative agents keep LLM keys in the control plane; other credential brokering needs integration.
✓ Proxy◐ Proxy✓ Proxy

Cost

The most capable execution environment is not necessarily the most cost-effective. A lightweight container costs less to run, but missing dependencies or tools may lead to longer agent runs, more retries, and more human intervention. A prepared VM costs more to run, but may make the work easier to complete.

The main costs are infrastructure, model usage, human effort, and mistakes. Computational overhead is often outweighed by the cost of human intervention or the consequences of incorrect changes.

The illustration below lets you explore these trade-offs across task difficulty, model choice, execution environment, and access to external services. Its values are hypothetical, intended to show how different assumptions affect the overall picture rather than predict actual performance or cost.

Blog

  • How a software factory earns the right to merge: CI, narrow checks and AI review feed fixed rules set by the blast radius. When the checks pass the change is ready to merge; on a conflict a reviewer resolves it.

    November 12, 20268 min read

    How a Software Factory Earns the Right to Merge

    A coding agent can turn a ticket into a green pull request in minutes. We split the merge decision into narrow checks, let fixed rules decide, set the strictness by the blast radius of a change, and bring in a person only where the agent gets stuck.

  • A ticket's path through a software factory. Most of the steps come before the coding agent starts.

    November 6, 20266 min read

    Stopping the Wrong Work Early

    We compared a stronger model, a different agent, answers from the author and a read-only investigation before any code. On 19 fresh tickets, the investigation went ahead on 9 of 10 wanted changes and held back 7 of 9 requests an author had already declined.

Transform your SDLC with agentsFrom copilots to a self-driving SDLC

With the team behind the first AI for code.

Backed by frontier coding agent research with ETH Zurich.