CUA-Sandbox: Efficient Environments for Computer-Use Agent Reinforcement Learning

Xin Yan, Zhengbo Jiao, Jiaqi Liu, Zhenglin Wan, SiYuan Ma, Xuliang Yu, Tianyi Jiang, Chubin Zhang, Pengfei Zhou, Wangbo Zhao, Xingrui Yu, Bo An, Yang You, Ivor TsangarXiv 2026

TL;DR

CUA-Sandbox is a high-efficiency environment manager for training computer-use agents (CUAs) that decouples execution runtimes from mutable state. By sharing initialized application processes across parallel rollouts while isolating changes in private "state capsules," it achieves up to a 6.2x increase in throughput and a 504x reduction in storage costs without sacrificing task fidelity.

What Problem Does This Paper Address?

Reinforcement Learning (RL) for computer-use agents—AI that interacts with websites and desktop apps—is notoriously resource-intensive. To learn effectively, these agents require thousands of interactions with real software environments.

The current industry standard is to use "Conventional Sandboxes" (typically Docker containers). Every time you want to run a parallel rollout or reset a task, the system instantiates a complete, independent runtime. This means replicating the entire operating system, application stack, and memory for every single agent. As you scale to hundreds of parallel environments, the "infrastructure tax"—in the form of massive memory overhead and slow initialization times—becomes a major bottleneck for research and production. The authors ask a fundamental question: Does an independent computer-use environment actually require an independent execution runtime?

Comparison between conventional sandboxes and CUA-Sandbox's runtime-state separation.

Methods

The core innovation of CUA-Sandbox is the separation of the execution runtime (the processes that run the code) from the mutable state (the files, databases, and sessions that change during a task).

Key components include:

  • State Capsules: Instead of a full container, each environment gets a "capsule" containing only what changes. This includes Authoritative state (databases, user files), Derived state (caches), and Ephemeral state (display endpoints).
  • State-Scoped Execution: A routing layer that directs an agent's actions to the correct state capsule. While the underlying application processes are shared, each agent "sees" only its private data.
  • Transactional Lifecycle: Operations like Reset, Clone, and Fork now operate only on the state capsules. Because the shared runtime stays live, these operations are nearly instantaneous compared to restarting a Docker container.
  • Three-Plane Infrastructure: The system is organized into a State Plane (managing backends), an Execution Plane (binding actions to capsules), and a Control Plane (scheduling and lifecycle management).
The CUA-Sandbox architecture and execution flow.

Datasets

The authors evaluated CUA-Sandbox across three major benchmarks for computer-use agents:

  1. WebArena: A self-hosted environment for web-based tasks (e.g., shopping, CMS management).
  2. VisualWebArena: An extension of WebArena focused on visually grounded tasks requiring joint reasoning over images and text.
  3. OSWorld: A benchmark for multimodal agents performing open-ended tasks in real desktop environments (Ubuntu-based).

Key Insights and Ideas

  • State is the Unit of Independence: The authors observed that while trajectories require independent mutable state, the initialized application code and services can be safely shared. This shifts the focus from "isolating processes" to "isolating data."
  • Copy-on-Write is King: By using copy-on-write (CoW) mechanisms for state capsules, the system avoids the dominant cost of state materialization. A 3.6 GB shopping database capsule can be "created" in 0.071 seconds because only the changes (deltas) are stored.
  • Fidelity Preservation: Surprisingly, sharing a runtime can actually improve success rates slightly in some cases, likely due to reduced environment-related timeouts and errors that plague heavy container-based setups.
  • Atomic Transitions: To prevent "state leakage," the system uses a protocol that freezes routes and drains in-flight requests before publishing a new state generation, ensuring agents never interact with a partially updated environment.

Key Results

CUA-Sandbox demonstrates massive efficiency gains over the official Docker-based sandboxes:

  • Throughput: Achieved up to a 6.2x increase in rollout throughput (specifically on VisualWebArena).
  • Memory Efficiency: Reduced per-environment RAM usage by up to 9.2x.
  • Storage Savings: Achieved a staggering 504x reduction in incremental storage costs for environment snapshots.
  • Performance: In paired inference tests across four different models (including GPT-4 and Qwen variants), CUA-Sandbox maintained or slightly exceeded the task success rates of the Docker baseline.
Efficiency metrics comparing CUA-Sandbox to the official Docker-based sandbox.

Limitations and Future Work

  • Resource Contracts: The system relies on a "resource contract" that explicitly defines what needs to be isolated. If a task involves a stateful component not covered by the contract, isolation could break.
  • Complex Asynchrony: Background processes that cannot be easily attributed to a specific environment ID or "quiesced" (paused) still require a private, coarser-grained backend, which reduces the benefits of sharing.
  • Future Directions: The authors suggest exploring broader mutation workloads and longer trajectories to see where the sharing boundary eventually breaks down, as well as conducting "concurrency sweeps" to find the absolute maximum environment density achievable on a single machine.

Summary updated

BibTeX
@misc{yan2026cua,
  author = {Xin Yan and Zhengbo Jiao and Jiaqi Liu and Zhenglin Wan and SiYuan Ma and Xuliang Yu and Tianyi Jiang and Chubin Zhang and Pengfei Zhou and Wangbo Zhao and Xingrui Yu and Bo An and Yang You and Ivor Tsang},
  title = {{CUA-Sandbox: Efficient Environments for Computer-Use Agent Reinforcement Learning}},
  year = {2026},
  eprint = {2609.32750},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2609.32750},
}
Figure