Fork, Explore, Commit: OS Primitives for Agentic Exploration

πŸ“… 2026-02-09
πŸ“ˆ Citations: 0
✨ Influential: 0
πŸ“„ PDF
πŸ€– AI Summary
This work addresses the lack of effective isolation and atomic commit mechanisms in current AI agents when concurrently exploring multiple solution paths. To this end, we propose a novel operating system abstraction called β€œbranch context,” which provides agents with isolated, nestable, and rollback-capable execution environments through a structured fork-explore-commit/abort lifecycle. We design unprivileged OS-level mechanisms that support nested branching, commit-on-first-success semantics, and automatic invalidation of sibling branches. A prototype file system, BranchFS, is implemented atop FUSE, complemented by a new Linux system call, branch(), and copy-on-write techniques. Experimental results demonstrate that branch creation incurs only 350 microseconds of overhead, with small-scale commits completing in under 1 millisecond, substantially improving both the efficiency and safety of parallel exploration.

Technology Category

Application Category

πŸ“ 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 commit to the parent, and automatic sibling invalidation, all without root privileges. BranchFS is open sourced in https://github.com/multikernel/branchfs. Second, branch() is a proposed Linux syscall that spawns processes into branch contexts with reliable termination, kernel-enforced sibling isolation, and first-commit-wins coordination. Preliminary evaluation of BranchFS shows sub-350 us branch creation independent of base filesystem size, and modification-proportional commit overhead (under 1 ms for small changes).
Problem

Research questions and friction points this paper is trying to address.

agentic exploration
state isolation
atomic commit
rollback semantics
branch context
Innovation

Methods, ideas, or system contributions that make the work stand out.

branch context
copy-on-write isolation
agentic exploration
atomic commit
first-commit-wins
πŸ”Ž Similar Papers
C
Cong Wang
Multikernel Technologies, Inc., USA
Yusheng Zheng
Yusheng Zheng
UC santa cruz