DeltaBox: Scaling Stateful AI Agents with Millisecond-Level Sandbox Checkpoint/Rollback
Yunpeng Dong 1 , Jingkai He 1,2 , Yuze Hou 1 , Dong Du 1,2 ✉, Zhonghu Xu 3 , Si Yu 3 , Yubin Xia 1,2 , Haibo Chen 1,2 1 Institute of Parallel and Distributed Systems, Shanghai Jiao Tong University 2 Engineering Research Center for Domain-specific Operating Systems, Ministry of Education, China 3 Huawei Technologies Co., Ltd · 2026
Read DeltaBox: Scaling Stateful AI Agents with Millisecond-Level Sandbox Checkpoint/Rollback by Yunpeng Dong 1 , Jingkai He 1,2 , Yuze Hou 1 , Dong Du 1,2 ✉, Zhonghu Xu 3 , Si Yu 3 , Yubin Xia 1,2 , Haibo Chen 1,2 1 Institute of Parallel and Distributed Systems, Shanghai Jiao Tong University 2 Engineering Research Center for Domain-specific Operating Systems, Ministry of Education, China 3 Huawei Technologies Co., Ltd (2026) in the Tower of Babel, a free online library of public-domain works preserved in clean, searchable text. No sign-up. The full text is served as a plain-text file at a predictable URL, where text is present: https://antarctic-labs.com/tower-of-babel/arxiv-2605-22781.txt.
Introduction
Dong and others speed checkpoint and rollback for stateful AI agent sandboxes from hundreds of milliseconds to millisecond scale. Their DeltaBox system copies only changes between successive checkpoints, which look highly similar in agent search and training. DeltaFS layers file states with copy on write switching, while DeltaCR dumps process state incrementally and forks rollback from a frozen template process. Measured checkpoint and rollback latencies of 14 milliseconds and 5 milliseconds let agents explore far more nodes under fixed time budgets on SWE bench and reinforcement learning benchmarks.
Catalog record
| CREATOR | Yunpeng Dong 1 , Jingkai He 1,2 , Yuze Hou 1 , Dong Du 1,2 ✉, Zhonghu Xu 3 , Si Yu 3 , Yubin Xia 1,2 , Haibo Chen 1,2 1 Institute of Parallel and Distributed Systems, Shanghai Jiao Tong University 2 Engineering Research Center for Domain-specific Operating Systems, Ministry of Education, China 3 Huawei Technologies Co., Ltd |
|---|---|
| YEAR | 2026 |
| COLLECTION | PAPERS |
| FORMAT | TXT |
| FILE SIZE | 83229 |
| LICENSE | http://creativecommons.org/licenses/by/4.0/ |
| RIGHTS | CC BY |
| SOURCE | arXiv |
Source: https://arxiv.org/abs/2605.22781
Browse the full library · About the Tower of Babel
Full text
The opening of the work, from the library's hosted text:
DeltaBox: Scaling Stateful AI Agents with Millisecond-Level Sandbox Checkpoint/Rollback Yunpeng Dong 1 , Jingkai He 1,2 , Yuze Hou 1 , Dong Du 1,2 ✉, Zhonghu Xu 3 , Si Yu 3 , Yubin Xia 1,2 , Haibo Chen 1,2 1 Institute of Parallel and Distributed Systems, Shanghai Jiao Tong University 2 Engineering Research Center for Domain-specific Operating Systems, Ministry of Education, China 3 Huawei Technologies Co., Ltd Abstract . LLM-powered AI agents require high-frequency state exploration (e.g., test-time tree search and reinforcement learning), relying on rapid checkpoint and rollback (C/R) of the complete sandbox state, including files and process state (e.g., memory, contexts, etc.). Existing mechanisms duplicate the entire state, causing hundreds of milliseconds to seconds of latency per C/R, which severely bottlenecks deep search and large-scale fan-outs. This paper observes that subsequent checkpoints in AI agents are highly similar. Therefore, instead of full duplication, a sandbox should only duplicate the changes between consecutive checkpoints ( Key Insight ). However, it is non-trivial to realize the idea, mainly due to the lack of OS support. This paper proposes a new OS-level abstraction, DeltaState , to enable the change-based transactional C/R for AI agents with two co-designed OS mechanisms. First, DeltaFS enables change-based filesystem C/R by organizing the file states into layers and dynamically freezing the writable layer and inserting a new one during checkpoint, reducing file updates to copy-on-write, and making rollback a simple layer switch. Second, DeltaCR enables change-based process state C/R using incremental dumps, and accelerates rollback by bypassing traditional pipelines to directly fork() from a frozen template process. We then present DeltaBox, a novel agent sandbox achieving millisecond-level C/R through the two new mechanisms. Evaluations on SWE-bench and RL micro-benchmarks show DeltaBox completes checkpoint and rollback in millisecond-level latency (14 ms and 5 ms, respectively), empowering agents to explore substantially more nodes under fixed time budgets. 1 1 footnotetext: Corresponding author: Dong Du ( [email protected] ). 1. Introduction LLM-powered AI agents have emerged as a primary approach to automating complex software engineering tasks. From automated code repair ( Jimenez et al. 2024 ) to web navigation ( Zhou et al. 2024 ) , these agents operate by iteratively generating actions ( Yao et al. 2023 ) , executing them within a secure sandboxed environment ( E2B 2024 ) , observing outcomes, and refining strategies. A recent trend to enhance agent capabilities is test-time compute scaling ( Snell et al. 2025 ) . State-of-the-art agents invest additional inference compute through systematic tree search (e.g., Monte Carlo Tree Search ( Zhou et al. 2024 ) or Best-of-N sampling), exploring multiple candidate paths, verifying them against real execution feedback, and backtracking from failures. However, applying tree search to stateful OS-level environments creates a severe infrastructure bottleneck. In early text-based tasks (e.g., HotPotQA), rollback was (almost) cost-free, achieved by simply truncating prompt history. Conversely, for more complex agent tasks ( Zhang et al. 2025 ; The OpenClaw Project 2026 ) , agent actions may produce irreversible side effects. E.g., for a coding agent: rm deletes files, pip install mutates the package tree, and sed rewrites source code. Both rollback and fork therefore require rapid checkpoint and rollback 1 1 1 We use rollback and restore interchangeably in the paper. Although synonymous, rollback implies the agent’s viewpoint, whereas restore refers to the underlying sandbox mechanism. of the complete sandbox state. The sandbox state encompasses two tightly coupled dimensions: durable filesystem state (e.g., working directories, installed packages) and ephemeral process state (e.g., process memory, python interpreter heap, open file descriptors, etc.). These dimensions must be captured and restored jointly to prevent state divergence or context loss. Fast C/R becomes even more pressing with modern reasoning models (o1-class ( OpenAI 2024 ) , DeepSeek-R1 ( DeepSeek-AI 2025 ) ), which internalize search within extended chains of thought but still execute code at each reasoning step via tool-use variants, trying alternative dependency installations, running test suites, and reverting failing patches. Execution-guided sampling allocates inference budget across many parallel candidate trajectories ( Brown et al. 2024 ; Snell et al. 2025 ) , each often requiring an isolated sandbox clone. Within each trajectory, iterative debug-test loops (generate patch \to run tests \to analyze failure \to revise \to repeat) demand fine-grained intermediate checkpoints. This creates a two-dimensional scaling challenge: horizontal scaling (many parallel trajectories, each needing a fast initial clone) and vertical depth (each trajectory’s internal search tree, requiring checkpoint/restore of intermediate states). Beyond test-time inference, training agent policies with reinforcement learning (RL) ( He et al. 2026 ; Shao et al. 2024 ; Yu et al. 2025 ) has emerged as a parallel infrastructure pressure point. Each RL training step issues a batch of k rollouts against a sandbox, scores them with a reward model, and updates the policy; production systems must repeatedly tear down and re-create k independent sandboxes per training step, each at a known-good warm starting state (the same testbed snapshot, with the same toolchain pre-loaded). Today’s deployed approaches rebuild this warm state by either committing a Docker layer per starting state and running a fresh container per rollout (latency dominated by container start and image pull), or by snapshotting and resuming a microVM per rollout (latency dominated by guest memory pre-touch and device re-attach). Both sit in the hundreds-of-milliseconds to seconds regime per fork; with k in the tens to low hundreds, fork latency directly bounds training throughput. Existing systems manage the filesystem and process memory in isolation, typically achieving C/R by duplicating the entire state into a checkpoint image. While full duplication works well for scenarios like serverless computing that prioritize cold-start restores ( Ao et al. 2022 ; Du et al. 2020 ; Ustiugov et al. 2021 ; Chai et al. 2025 ) , it is prohibitively slow for AI agents requiring high-frequency checkpoints on the critical path. Prior efforts face two main challenges: Challenge-1: High latency of agent checkpointing. Prior sandboxes usually focus on optimizations for restore but not checkpoint, e.g., in serverless computing ( Cvetković et al. 2024 ; Chai et al. 2025 ; Du et al. 2020 ; Du et al. 2022 ; Li et al. 2022 ; Yu et al. 2024 ; Huang et al. 2024 ; Szekely et al. 2024 ; Cvetković et al. 2024 ) , checkpointing happens offline which is usually a one-time cost, while restore directly impacts the cold start latency. As a result, current agent sandbox systems suffer high latency of checkpointing. E.g., E2B takes {\sim}4 seconds to pause a sandbox per 1 GiB of RAM ( E2B 2026 ) . Other approaches, e.g., CRIU ( The CRIU Project 2011 ) take seconds for multi-GiB process footprints. Docker commits take several seconds for non-trivial layer changes, and VM-level snapshots (e.g., Firecracker ( Agache et al. 2020 ) ) incur hundreds of milliseconds to seconds of latency ( Ao et al. 2022 ) . These latencies severely bottleneck deep search and large-scale RL fan-outs. Challenge-2: Lack of efficient C/R for durable file states. A significant challenge is how to efficiently checkpoint and restore the filesystem state of an agent sandbox. Current systems usually adopt file copying, which incurs high latency. Methods like docker commits, git stash/branch, and VM-level snapshots ( Agache