TimeTravelContainer: A Live Forking Sandbox for Stateful Agent Exploration

Zizheng Guo, Yanqing Zhang, Nathaniel Pinckney, Cunxi Yu, Brucek KhailanyarXiv 2026

TL;DR

Imagine giving an AI agent a video game-style "quick-save" button for the entire operating system it works inside. TimeTravelContainer (TTC) lets agents instantly clone live, memory-heavy software sessions in milliseconds without touching the disk or needing admin privileges. By sharing unchanged memory across parallel timelines, TTC turns multi-day trial-and-error workloads into fast, parallelized sub-hour sprints.

What Problem Does This Paper Address?

AI agents are graduating from writing simple text snippets to driving complex, stateful software—think interactive terminals, physics simulators, databases, and chip-design tools. To find the best solution, an agent wants to explore like a chess engine: branch out, test five ideas in parallel, and roll back when one hits a dead end.

Today’s container sandboxes (like Docker) are built for security isolation, not time travel. If an agent wants to clone a running tool holding 50 GB of RAM, it faces bad options: dump the entire memory state to disk and reload it (agonizingly slow), restart the tool from scratch (losing live state), or install custom Linux kernel patches (which require root privileges you'll never get on shared corporate clusters or personal laptops). Standard Unix fork() doesn't work either, as it abandons background threads and breaks complex multi-process setups.

TABLE I: Comparison of agent execution environments.

Methods

Instead of fighting the host operating system's kernel, the authors lift the OS into userspace. TTC builds on gVisor, an unprivileged userspace kernel ("Sentry") originally designed for security sandboxing. Because gVisor intercepts system calls and manages process trees, file descriptors, and page tables inside its own standard process memory, TTC repurposes it into a live-cloning engine:

  • In-Memory Copy-on-Write (CoW) Forking: When an agent branches a container, TTC duplicates the lightweight userspace kernel metadata and marks memory pages as read-only in hardware. Clones share the exact same physical RAM until one tries to write to a page, triggering a quick 4 KiB copy of just that diverged page.
  • Virtual CoW Filesystem: Rather than duplicating giant binary workspaces like git worktree does, TTC intercepts file I/O in userspace, sharing unmodified files by reference and copying only on write.
  • Lifecycle & Cluster Scaling: Idle branches can be paused (freeing CPU) or dehydrated (saving only diverged private memory pages to disk, resuming instantly via on-demand page fetching). It also supports remote forking across cluster nodes by streaming memory chunks lazily over the network.

All of this runs rootless across Linux, macOS (Apple Silicon), and Windows (WSL 2), with zero modifications to the proprietary tools running inside.

Fig. 1: TTC architecture. All branches share one userspace platform and a common page pool. Each branch maintains an independent kernel (processes, VFS, network). Pages marked S are shared via CoW; pages marked P have diverged and are branch-private. Operations shown: fork (instantaneous in-memory clone), pause (CPU release, memory resident), dehydrate (private pages to disk), and remote fork (cross-node clone with on-demand page fetch).

Datasets

The authors evaluate TTC on Electronic Design Automation (EDA) chip-design workflows—a brutal stress test featuring unmodifiable proprietary binaries and massive memory footprints:

  • MAGE flow (driving Cadence Innovus): Two large-scale circuit benchmarks, Ariane133 (~119K cells) and BlackParrot (~719K cells).
  • EvoDRC flow (driving KLayout): Seven small layout blocks (Block1–7) from the DAC'26 DRC benchmark suite, plus three larger designs (AES, Ibex, and JPEG, up to ~76K cells) adapted by the authors from ResizerAgent to test scaling.

Key Insights and Ideas

  • Sandbox security tech is secretly a virtualization superpower: By realizing gVisor already tracks all OS state in userspace to contain untrusted code, the authors gained full control over process trees and memory mapping without needing root access or KVM.
  • Forking cost scales with divergence, not size: In heavy engineering tools, most RAM holds static, read-only data (parsed circuit graphs, libraries, cached indices). Because clones only pay for the memory pages they actively mutate, cloning a multi-gigabyte tool takes roughly a second.
  • Fast branching changes how agents can think: Eliminating startup and checkpoint taxes unlocks fine-grained tree search and rapid Monte Carlo rollouts on heavyweight tools where agents previously had to trudge sequentially.

Key Results

  • 84.1× Faster Cloning: In MAGE/Innovus, cloning the Ariane133 environment dropped from 86.5s (disk checkpoint/restore) to 1.03s. On the massive BlackParrot design, it fell from 185.7s to 3.01s (61.8× speedup).
  • 31–72% Memory Savings: Running 6 concurrent Ariane133 branches took 7.5 GB right after forking (70% saved) and 12.2 GB after heavy divergent workloads, compared to 27.9 GB without TTC.
Memory reduction across concurrent Innovus branches showing 31% to 72% savings via CoW sharing.
  • Transformative End-to-End Speedups: By keeping KLayout initialized and forking per candidate in EvoDRC, single-call speedups hit 173× on the JPEG design. Across a 10-call repair campaign, runtime dropped from 23.7 hours to 2.5 hours (9.4× overall speedup).

Limitations and Future Work

  • Downstream Tool Bottlenecks: In workflows like MAGE, overall end-to-end runtime is currently dominated by multi-minute circuit routing steps inside Innovus rather than environment cloning—meaning TTC's massive cloning speedups shine brightest as agents shift toward shorter, finer-grained exploration steps.
  • Simulated Workloads: To isolate infrastructure performance, experiments replayed fixed tool workloads excluding live LLM inference latency.
  • Future Directions: Because TTC is tool-agnostic and runs on consumer laptops and edge devices, the authors envision applying it to database tuning, mid-episode robotics simulation branching, full-stack software engineering, and harvesting branched agent trajectories at scale to train better agentic models.

Summary updated

Abstract

LLM agents that drive stateful tools (e.g., interactive shells, design environments, simulation engines) frequently need to clone, backtrack, and parallelize live sessions to support exploration. However, cloning a live session today requires serializing the tool's in-memory state to disk or relaunching from scratch, both prohibitively slow for interactive exploration. Existing agent sandboxes based on microVMs or kernel patches either serialize full guest memory to storage or require privileged deployment, limiting use on shared compute farms, personal computers, and other restricted environments. We present TimeTravelContainer (TTC), a rootless container runtime that live-forks an entire running container, including processes, memory, filesystem, and network, with copy-on-write (CoW) semantics. Because the bulk of a tool session's memory is typically read-only after the fork point, clones share it automatically and only diverged pages consume additional memory. TTC requires no kernel modifications, hardware virtualization, or root privileges, and runs on all major platforms including Linux, macOS (Apple Silicon), and Windows (WSL 2), making it deployable as a portable foundation for agent harnesses. We evaluate TTC on two agentic electronic design automation (EDA) flows as representative stateful-tool workloads: MAGE (Innovus) and EvoDRC (KLayout). TTC achieves 84.1$\times$ environment cloning speedup, 31--72% memory reduction, and 1.7--9.4$\times$ end-to-end speedup, demonstrating that live forking removes a scaling barrier for agent-driven exploration of stateful tool environments.
BibTeX
@misc{guo2026timetravelcontainer,
  author = {Zizheng Guo and Yanqing Zhang and Nathaniel Pinckney and Cunxi Yu and Brucek Khailany},
  title = {{TimeTravelContainer: A Live Forking Sandbox for Stateful Agent Exploration}},
  year = {2026},
  eprint = {2611.32255},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2611.32255},
}
Figure