StateFork: Branchable Infrastructure for Agent Exploration
Jiakai Xu, Tianle Zhou, Georgios Liargkovas, Danielle Gillai, Ruizhe Fu, Patrick Shen, Eugene Wu, Kostis Kaffes
Abstract
AI agents improve task success by exploring multiple trajectories, but for computer-use agents each trajectory modifies external environment state. Branching from an intermediate point is correct only when restoration is observation-equivalent - future actions produce the same observations - and practical only when creating, restoring, and discarding branch states is physically efficient. We study this problem for terminal-using agents, where tasks modify files, shell context, running processes, and local services. We introduce StateFork, a logical control plane that separates exploration policies from physical state materialization, exposing sessions, commands, snapshots, restores, and cleanup over multiple execution substrates. We also build Waypoint, a checkpoint/restore substrate for terminal execution sessions that combines filesystem layering, process checkpointing, and a persistent terminal-compatible command session. Together, StateFork and Waypoint improve terminal-agent exploration by combining sample-efficient search with efficient restoration of the right execution state. On Terminal-Bench, branch-based exploration through StateFork and Waypoint improves task completion over pass@20 at the same visited-node budget, and using Waypoint achieves 26% higher task accuracy than other execution substrates while completing exploration up to 70% faster. These results show that observation-equivalent, physically efficient execution sessions are a key systems abstraction for exploratory AI agents.
Create a lesson
Related papers
TimeTravelContainer: A Live Forking Sandbox for Stateful Agent Exploration
Shared title terminologycs.OSZizheng Guo, Yanqing Zhang, Nathaniel Pinckney et al.
Fork, Explore, Commit: OS Primitives for Agentic Exploration
Shared title terminologycs.OSCong Wang, Yusheng Zheng
Ambar: Memory Management for Agentic AI Sandboxes at Scale
Shared title terminologycs.OSYigit Kemal Can, Pratyush Patel, Neha Gholkar et al.
TideSand: Performance-Accurate Sandbox Multiplexing for LLM Agents
Shared title terminologycs.OSShulu Li, Hanchen Li, Xiaokun Chen et al.
Towards Fair Resource Sharing in Agentic LLM Serving
Shared title terminologycs.OSSehyeon Lee, Yuchen Xia, Zhaoyang Hong et al.
KernelArmor: End-to-End Agentic System for Establishing Memory and Thread Safety for CUDA
Shared title terminologycs.OSBodhisatwa Chatterjee, Mohamed Tarek Ibn Zaid, Sana Damani et al.