Fork, Explore, Commit: OS Primitives for Agentic Exploration
Cong Wang, Yusheng Zheng

TL;DR
This paper introduces 'branch contexts,' an OS abstraction for agentic exploration that enables isolated, atomic, and hierarchical environment management, implemented via a new Linux filesystem and syscall, improving exploration efficiency.
Contribution
It presents a novel OS primitive called branch context, combining copy-on-write isolation, structured lifecycle, and hierarchical nesting, realized through BranchFS and a new Linux syscall.
Findings
BranchFS enables sub-350 microsecond branch creation.
Atomic commit overhead is under 1 millisecond for small changes.
The approach supports hierarchical and parallel exploration with isolation.
Abstract
AI agents increasingly perform agentic exploration: pursuing multiple solution paths in parallel and committing only the successful one. Because each exploration path may modify files and spawn processes, agents require isolated environments with atomic commit and rollback semantics for both filesystem state and process state. We introduce the branch context, a new OS abstraction that provides: (1) copy-on-write state isolation with independent filesystem views and process groups, (2) a structured lifecycle of fork, explore, and commit/abort, (3) first-commit-wins resolution that automatically invalidates sibling branches, and (4) nestable contexts for hierarchical exploration. We realize branch contexts in Linux through two complementary components. First, BranchFS is a FUSE-based filesystem that gives each branch context an isolated copy-on-write workspace, with O(1) creation, atomic…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsSecurity and Verification in Computing · Parallel Computing and Optimization Techniques · Logic, programming, and type systems
