Skip to content

Planarian: Managing Agent Local and Remote State with StatepointsPlanarian: Managing Agent State with Statepoints

Paper Tracker· arXiv:2609.35366· Jinnan Guo, Hao Mark Chen, Kapil Vaswani, Andrew Paverd, Peter Pietzuch·Indexed by this site · 2026-10-04· Originally publishedDefenses

Quick read

Other

Based on the paper PDF (AI-generated); refer to the original

Planarian uses statepoints to roll back and branch environments; Mario scores 15× no-snapshot, with 1%–3% overhead.

Questions
Agents modify files, call tools, and change remote services via MCP; when they err or explore, side effects must be undone. Existing harnesses lack state management that covers both local and remote and is consistent with the context.
Methods
Planarian reduces sandbox processes, files, and supported MCP changes to a statepoint. A snapshot records that point, rollback reverts using local checkpoints plus compensating actions, fork creates an isolated branch, and state evidence is appended to the context.
Experiments and results
Within one hundred steps, Mario's score is 15× that of no-snapshot, and Flappy Bird and Minecraft are 1.4×. System management task completion time is 1% more, DevOps less than 3%, and database fifty-item E2E is 3% more. In MCTS, full-snapshot overhead is 10× that of it.
Limitations and future work
The paper does not specifically discuss limitations. Experiments include three GameWorld games, nine Terminal-Bench tasks, sixteen DevOps-Gym tasks, and fifty Bird tasks, plus memory and filesystem microbenchmarks. The remote compensation prototype targets database SQL.
Experimental setupGameWorld、Terminal-Bench 2.0 et al. · score、Pipes passed et al.
Benchmarks
GameWorldTerminal-Bench 2.0DevOps-GymBird-interact-lite
Metrics
scorePipes passedDirt collectedcompletion timeend-to-end timesnapshot/rollback/fork time
AI summaryThe researchers propose Planarian, an agent runtime with state management capabilities that lets agents and users recover from erroneous actions and explore alternative execution paths on consistent local and remote environment states. Its core abstraction is agent statepoints, i.e., consistent, recoverable versions of environment state at a point in time. Planarian exposes three primitives to agents and users: snapshot captures local sandbox state via incremental process and filesystem snapshots and transparently records remote state changes with compensating actions, without requiring external services to support checkpointing; rollback reverts to a previous local checkpoint and replays compensating actions to undo remote changes; fork creates multiple isolated branches from a statepoint, letting agents explore different approaches in parallel. The authors say Planarian lets agents undo mistakes and explore alternatives in parallel, improving task quality by up to 15×, with only 3% extra overhead for users to recover from erroneous actions.

The researchers propose Planarian, an agent runtime with state management capabilities that lets agents and users recover from erroneous actions and explore alternative execution paths on consistent local and remote environment states. Its core abstraction is agent statepoints, i.e., consistent, recoverable versions of environment state at a point in time. Planarian exposes three primitives to agents and users: snapshot captures local sandbox state via incremental process and filesystem snapshots and transparently records remote state changes with compensating actions, without requiring external services to support checkpointing; rollback reverts to a previous local checkpoint and replays compensating actions to undo remote changes; fork creates multiple isolated branches from a statepoint, letting agents explore different approaches in parallel. The authors say Planarian lets agents undo mistakes and explore alternatives in parallel, improving task quality by up to 15×, with only 3% extra overhead for users to recover from erroneous actions.

Paper analysis

6 questions; open one to read the full answer

  1. What problem does this paper attempt to solve?

    Agents lack rollbackable and branchable environment state management across local and remote.

    After agents modify local and remote environments, there is a lack of consistent, recoverable, branchable state management.

    • Scenario: Agents iteratively modify files, call local tools, and access remote services via MCP. The authors say that after failures or mistakes, earlier changes must be undone; manual reconstruction requires extra tool calls and may be impossible when data is lost.
    • Gaps: The authors list three: local and remote must be restored together, otherwise rolling back only local reports will be inconsistent with the already-updated remote database; must integrate with existing harnesses and handle context—tool history may describe effects that no longer exist, keeping all of it misleads, dropping all of it loses evidence of failure; frequent management must not dominate execution time or storage. The authors say existing checkpointing, transactional recovery, and compensation methods cover only part of this and are not oriented toward agent exploration.
    • Observation and proposal: The authors frame the open problem as: make changing environment state the unit of recovery and exploration, while achieving local/remote consistency, context consistency, and low enough overhead for repeated use. Planarian is a runtime that works with existing harnesses, using agent statepoints to represent recoverable point-in-time versions, with state descriptions and prior results. The primitives are snapshot, rollback, fork.
    • Threat model: The paper does not use terms like white-box.
      • Goal: Isolate side effects of alternative actions during exploration; for safety, undo unwanted changes. The authors give examples of deleting a needed file, installing the wrong package, and incorrect database writes.
      • Initiators: Users, harnesses, or agents can initiate, ensuring independence from who initiates. The authors say LLM outputs are nondeterministic and unreliable, citing hallucination and sycophancy.
      • Capabilities: Local tools are confined to the sandbox. Remote can only be observed and modified via service APIs. Without checkpoints, compensation actions undo supported operations; requests that cannot be compensated are rejected before execution.
      • Objects: Files and processes in the sandbox, and external service state modified by supported MCP operations.
  2. What related research exists?

    The authors compare by checkpoint scope and recovery method, and state that none covers all their requirements.

    The authors compare prior work by environment coverage, consistency, and primitives, and say no method satisfies all four items in Table 1.

    Exploration Mechanisms

    • Multiple attempts and search: Chen et al. (2021) pass@K, Świechowski et al. (2023) survey of MCTS, Hua et al. (2026) EAPO are treated by the paper as exploration methods requiring backtracking and state branching, not as state management baselines.
    • Task search: Antoniades et al. (2025) SWE-search uses Git for MCTS-style search on software engineering tasks. Yu et al. (2025) ExACT does LLM-driven MCTS on GUIs, relying on backtracking in Web environments. The authors say Planarian extends the former to terminal tasks and can integrate with the latter.

    Checkpointing and Recovery

    • Framework checkpoints: LangChain (2025) and OpenClaw (2026) save conversations, intermediate results, and workflow progress. The authors say they cover at most partial local state, not remote, and rolling back a conversation does not undo database updates.
    • Sandbox checkpoints: Podman, E2B, CubeSandbox, and DeltaBox (cited as 2026 in the paper) manage local files and processes, supporting record, restore, and branch. The authors say remote state is outside the sandbox, so there is no local/remote consistency; among them, DeltaBox preserves consistency between context and local state.
    • Workflow recovery: SagaLLM (2025), LogAct (2026), Cordon (2026) use corrective actions or deferred commits. The authors say they can include remote effects and partial local changes, but not running processes; compensation requires undo operations, and staging cannot undo already-released effects.

    Underlying Mechanisms and Agent Versions

    • Process and workflow checkpointing: Ansel et al. (2009) DMTCP, Du et al. (2020) Catalyzer preserve local execution. The authors say they cannot handle remote services or agent decisions. Zhang et al. (2020) transactional workflows, Su et al. (2007) AutoBash, Kim et al. (2010) selective re-execution are classified by the authors as general workflows or application repair.

    • Files, cloud sandboxes, and databases: AgentFS (2026) checkpoints only the filesystem and copies the entire writable layer. Daytona and E2B persistent sandbox snapshots do not include remote. Dolt and Neon (2026) provide branchable databases, which the authors say can be integrated via hooks. Agent Sandbox (2026) can pause k8s pods; the authors say Planarian targets local deployment and can integrate with it.

    • Snapshot implementation: The paper uses and discusses CRIU, ZFS (Ahrens et al., 2003), and mentions Btrfs (Rodeh et al., 2013) and dm-snapshot.

    • Baselines and benchmarks: Experimental baselines are No-snapshot and Full-snapshot; microbenchmarks also have CRIU-inc. Benchmarks are GameWorld, Terminal-Bench 2.0, DevOps-Gym, Bird-interact-lite.

    The authors use the four columns of Table 1 to position differences: local/remote state, two types of consistency, three primitives, three types of initiators. The authors say no prior method satisfies all of them, and Planarian puts them into the same statepoint abstraction.

  3. How does the paper address this problem?

    Use statepoints to uniformly record sandbox and remote changes, then roll back or branch.

    Planarian reduces sandbox state and supported remote changes at tool call boundaries to a statepoint, then records, rolls back, or branches it.

    Abstraction and primitives

    • Statepoint: A consistent, recoverable version of the environment at a moment, plus evidence: a state description and prior execution results from that point. Evidence is stored separately from environment state and LLM context.
    • Two domains: Local is files and processes inside the sandbox, with the boundary set by the sandbox. Remote is the state of external services changed by supported operations; services need not provide checkpoints.
    • Consistency: Local and remote must correspond to the same observable moment. The authors state that collecting the two sides independently could describe an environment that never existed.
    • Three primitives: snapshot records a new point at a chosen tool call boundary, not required at every call. rollback returns to a recorded point; context does not roll back, and information about the failed attempt is retained. fork branches the environment from an existing point, keeping the source branch; remote isolation requires the service to support independent branches.

    Runtime and interface

    • Components: The sandbox manager manages the Podman sandbox and dispatches local tools; the state proxy intercepts MCP; the statepoint manager coordinates the two sides; the registry stores points; the context library provides evidence to the harness. Entries in Fig. 5 contain local CRIU/ZFS artifacts, remote endpoints and MCP call locations, evidence, and discarded, pending, committed states.
    • Callers: The user, harness, or agent. In Table 2, snapshot(sb, capture) records a point, rollback(sp, sb, compensate) restores the sandbox and services, and fork(sp-local, sb) branches the sandbox from local state. capture and compensate are hooks connecting remote recovery.
    • Context: Table 3's StateRecord and AppendOutcome write descriptions and subsequent results; ConstructLedger echoes evidence before a choice; RestoreContext provides, after rollback, the description of the chosen state, prior results, and a rolled-back notification. The harness still calls the LLM and assembles context, and does not delete existing context. The authors state that without this restored context, the agent may repeat errors based on stale context.

    Local checkpoints

    • Implementation: The Podman container is the local boundary, with the root file system mounted on a ZFS dataset. The process tree is checkpointed with CRIU; the file system snapshot is a metadata-only, zero-copy operation.
    • Incremental protocol: The authors state that CRIU's native incremental mode falls back to full on the first checkpoint after restore. Algorithm 1 does not modify CRIU or the kernel: after restore and before continuing execution, it clears soft-dirty bits and moves the parent checkpoint's creation time to after the restore thread starts, to pass CRIU's creation-time check. On fork, a per-sandbox restore image is written to avoid two sandboxes writing the same image simultaneously.
    • Parameters: The protocol input includes a full-interval k. The paper does not give the k used in experiments. Callers may snapshot after every or every few tool calls; the primitives do not prescribe frequency.

    Remote compensation and commit

    • Proxy: The harness configures the state proxy as an MCP server, and the proxy then accesses the target, without changing the original MCP API. Services that can version (the paper cites Neon, Dolt) use the service's own branching or rollback directly.
    • Database prototype: For a single SQL statement on the database MCP, it runs a pre-image statement, the original statement, and a post-image statement recording affected keys, all in one transaction. On success, compensating actions are written to an undo log; on rollback, they are replayed in the reverse order of the MCP requests. A proxy-level lock serializes requests. Requests that cannot be compensated are rejected before execution.
    • Commit: snapshot freezes container processes with cgroup freeze, then collects CRIU, ZFS, and MCP locations, and unfreezes when done; the container itself is not stopped, to avoid cold starts each time. It is marked committed only if all succeed, otherwise pending. Rollback first stops the container, compensates through the proxy, restores the file system, and only then restores via CRIU.
    • Remote branching and assumptions: When only compensation is possible, not branching, a forked sandbox cannot use that state proxy. The authors assume external services are isolated by tenant logic; snapshots are taken between tool calls because external services that do not expose the corresponding API cannot be silently hidden.

    Overlap with execution

    • Locks: One file lock per sandbox. Tool calls take a shared lock. snapshot and rollback take an exclusive lock, waiting for in-flight calls and blocking new ones. fork takes a shared lock on the source sandbox and an exclusive lock on the new sandbox.
    • Overlap: snapshot and fork can run in parallel with LLM inference. The runtime sits on top of Podman, CRIU, and ZFS, with no separate daemon, using background workers for asynchronous operations.
  4. What experiments did the paper conduct?

    Mario score is 15× that of no-snapshot; time overhead for system and database tasks is 1% to 3%.

    Experimental Setup

    • Machine and implementation: Ubuntu 22.04, Intel Xeon Silver 4310 (24 cores, 48 threads), 128 GB RAM, NVMe SSD. Implemented in Go and Python; Podman 5.8.6, ZFS 2.3.9, CRIU 4.2.1; database MCP uses MCP toolbox for databases.
    • Integration and models: Integrates mini-swe-agent, nanobot, SWE-search, GameWorld harness. GPT-5.6-luna (medium reasoning) generates MCTS trajectories, §7.3 tool-call trajectories, and §7.4 MCP request trajectories. The LLM used for GameWorld is not named in the paper.
    • Benchmarks and subsets: GameWorld (the paper says 34 games) evaluates Mario, Flappy Bird, Minecraft, each for 100 steps, with difficulty set to the level with maximum absolute progress within the step limit. Terminal-Bench 2.0 (89 items) uses nine system administration tasks. DevOps-Gym (704 items, 30+ projects) uses 16 implementation tasks for build/configuration. Bird-interact-lite (300 items) runs 50 items, modifying PostgreSQL via MCP.
    • Baselines: No-snapshot is a Podman container without state management. Full-snapshot uses Podman's native full process and filesystem snapshots, ext4, no copy-on-write. Games also have Planarian (No rollback). Microbenchmarks also have CRIU-inc, i.e., using CRIU native incremental checkpoints via Podman.
    • Protocol: §7.3, §7.4, and MCTS replay generated trajectories because LLM outputs are nondeterministic; MCTS replay includes recorded LLM latency. Games create statepoints between games, and only non-terminal states can be rolled back; player unobservable states that cannot be reconstructed from historical screenshots are filtered out. Minecraft is a simplified collection simulator, and the authors add creeper, lava damage, etc. The paper does not report the number of repetitions.
    • Metrics and granularity: Games use score; in Fig. 6, Flappy Bird's axis is Pipes passed, Minecraft's axis is Dirt collected. Also completion time, E2E, and snapshot, rollback, fork, command times. Terminal experiments snapshot after each tool call, which the authors say aligns with human approval granularity, and roll back to a previous snapshot at the end.

    Main Results

    SettingAuthors' reportSource
    GameWorld Mario, 100 stepsScore is 15× No-snapshot§7.2
    Flappy Bird, Minecraft, 100 stepsBoth are 1.4× No-snapshot§7.2
    Terminal-Bench nine system administration tasksCompletion time is 1% more than No-snapshot; 20% more than Full-snapshot§7.3, Fig. 9
    DevOps-Gym 16 build/configuration tasksExtra completion time under 3%; Full-snapshot 59% more§7.3, Fig. 10
    Bird-interact-lite 50 itemsE2E is 3% more than No-snapshot§7.4, Fig. 11
    MCTS, Terminal-Bench nine tasksFull-snapshot's snapshot overhead is 10× Planarian, fork 2×, E2E 9% slower§7.2, Fig. 8
    Abstract and introduction framingAbstract writes task quality up to 15×, cost of recovering from erroneous actions 3%; introduction writes completion time increases 1%–3%, including collaborative recovery modifying a remote database via MCPAbstract, §1
    • Bad states: The authors say that when a game enters a bad state (e.g., death reset), the LLM rolls back to a previous better state and tries other plans according to the restore context; the authors point to Fig. 7. Fig. 7 text contains a Score axis 0–300 and Step ticks 20–100, with no per-point numerical annotations.
    • Timing comparison: The authors say snapshots may change frame timing and thus results, so they add a variant that only snapshots without exposing rollback; this variant scores higher than No-snapshot and lower than full Planarian.
    • Filesystem load: The authors say most Terminal-Bench tasks are not filesystem-intensive, and copy-on-write does not add significant overhead.

    MCTS-Style Tree Search

    • What was tested: Extending SWE-search to the nine Terminal-Bench system administration tasks. Nodes snapshot and fork on demand, overlapped with LLM calls. GPT-5.6-luna (medium reasoning) generates trajectories, then replayed. No-snapshot is not included; the paper says it has no fork.
    • Results: The authors say Full-snapshot's snapshot overhead is 10× Planarian, fork overhead 2×, E2E 9% slower (§7.2, Fig. 8).
    • Authors' interpretation: Each node has two LLM calls, and the latency is enough to hide most of Full-snapshot's overhead, so the E2E gap is smaller than the primitive gap. The authors say that with more frequent snapshot/fork or lower LLM latency, the E2E gap would be closer to the primitive gap.

    Consistent Rollback of Remote Databases

    • What was tested: 50 Bird-interact-lite tasks modify PostgreSQL via MCP. Planarian snapshots after each request and rolls back both the sandbox and the database; the state proxy rewrites SQL and generates compensating actions. Trajectories are generated by GPT-5.6-luna (medium reasoning) and replayed.
    • Results: The authors say end-to-end time is 3% more than No-snapshot. The state proxy makes MCP round-trip time 1.3× No-snapshot, and the authors say request amplification increases E2E by under 0.3% (§7.4, Fig. 11).
    • Sources given by the authors: The harness sometimes sends multiple MCP requests consecutively, so snapshot time cannot be hidden; both the sandbox and database need extra rollback; SQL operations are added to make requests undoable.

    State Primitive Microbenchmarks

    • What was tested: Dirty memory or filesystem, snapshot twice consecutively, measure the second; then measure rollback or fork to the second point. Memory load also measures the first snapshot after rollback and fork. Compares Full-snapshot with CRIU-inc. Fig. 12–14 working set ticks are 16M, 128M, 1G, 8G.
    • Results: The authors say at 8 GB, incremental snapshot is 74× and 231× relative to Full-snapshot on memory and filesystem; first snapshot after rollback is 11× relative to CRIU-inc. Rollback relative to Full-snapshot is 4× and 67× at 8 GB memory and filesystem; fork is 4× and 61× (§7.5).
    • Authors' interpretation: The authors say that under this incremental protocol and copy-on-write storage, these primitives are faster than the corresponding baselines above. For the other working sets in the figures, the extracted text gives no per-point bar heights.

    Other Ablations and Analyses

    • No rollback: Snapshot each step but do not expose rollback; the authors say score is higher than No-snapshot and lower than full Planarian (§7.2, Fig. 6).
    • Terminal primitive times: The authors say snapshot/rollback time is reduced by 89% relative to Full-snapshot (§7.3).
    • DevOps primitive times: The authors say Full-snapshot's sandbox snapshot/rollback time is about 24× Planarian, so it is hard to hide behind LLM inference (§7.3).
    • DevOps completion time: The authors say Planarian's extra completion time relative to No-snapshot is under 3%, Full-snapshot 59% more (§7.3, Fig. 10).
    • Conditions for hiding overhead: The authors say on Terminal, Full-snapshot's E2E gap is smaller than the primitive gap because LLM latency hides part of the snapshot time (§7.3).
  5. What are some points that can be further explored?

    The paper does not write limitations or future directions.

    Limitations and Future Directions Noted by the Authors

    The paper does not specifically discuss limitations.

    Experimental Coverage

    • Models and replay: MCTS, §7.3, and §7.4 trajectories are generated by GPT-5.6-luna (medium reasoning) and replayed; the LLM used for GameWorld is not named in the paper. The paper says trajectories are replayed because outputs are nondeterministic, and does not report the number of repetitions.
    • Task subsets: GameWorld evaluates Mario, Flappy Bird, Minecraft, each for 100 steps. Terminal-Bench 2.0 uses nine system administration tasks (benchmark has 89). DevOps-Gym uses 16 implementation tasks for build/configuration (benchmark has 704). Bird-interact-lite runs 50 items (benchmark has 300).
    • Baselines and integration: Comparisons include No-snapshot, Full-snapshot; microbenchmarks also have CRIU-inc; games also have Planarian (No rollback). The paper says MCTS does not include No-snapshot because it has no fork. Integration targets include mini-swe-agent, nanobot, SWE-search, GameWorld harness; the evaluation section does not separately report result numbers for nanobot.
    • Remote state: The state proxy prototype supports compensable SQL for database MCP; §7.4 modifies PostgreSQL via MCP. The authors write that remote branching requires service-side branching (examples Neon, Dolt); when only compensation is supported, forked sandboxes cannot use this state proxy.
    • Environment and metrics: Testbed is Ubuntu 22.04, Xeon Silver 4310, 128 GB, NVMe, Podman 5.8.6, ZFS 2.3.9, CRIU 4.2.1. Metrics are score, Pipes passed, Dirt collected, and completion time, E2E, and snapshot/rollback/fork times. The paper does not report significance tests. Microbenchmark working sets scale to 8G.
  6. Summarize the main content of the paper

    Statepoints support rollback and branching; Mario scores 15×, time overhead 1%–3%.

    Planarian is a runtime that works with existing harnesses, reducing the agent environment to recoverable, branchable points in time.

    • Problem: Tool calls simultaneously modify files, processes in the sandbox, and remote services. Exploration must remove side effects of failed branches, and safety requires withdrawing erroneous operations. Restoring only one side, or letting context still describe effects that no longer exist, leaves inconsistency; frequently copying large memory blocks can also consume execution time.
    • Method: Agent statepoints record both local checkpoints and MCP positions between tool calls. snapshot creates a point, rollback first replays compensating actions then restores the local checkpoint, fork splits sandboxes from local state. When remote has no versioning, supported operations are rewritten into compensable form; the database prototype keeps before-images and affected keys in the same transaction. Context does not delete old records, only appends descriptions of restored state and prior results. Locally uses ZFS copy-on-write, and a CRIU protocol that remains incremental after restore.
    • Quality: Within 100 steps in GameWorld, Mario scores 15× no-snapshot, Flappy Bird and Minecraft 1.4×. The snapshot-only, no-rollback variant is higher than no-snapshot and lower than full Planarian. The abstract writes task quality as up to 15×.
    • Overhead: On mini-swe-agent, completion time for nine system administration tasks is 1% more, 16 DevOps implementation tasks under 3%; E2E for 50 database tasks is 3% more. The abstract writes the cost for users to recover from erroneous actions as 3%, the introduction as 1%–3%. Relative to full checkpoints, in MCTS snapshot overhead is 10×, fork 2×, E2E 9% slower.
    • Authors' conclusion: The authors say agents can revisit decisions and explore alternatives, with state management overhead in the ranges they report above.
Read originalarxiv.org