# Why does an instance roll back to a checkpoint that no peer ever committed? Speculative Multi-Agent Rollback Reconciliation and the Orphaned-Warrant Boundary **Date of Record:** 2026 December 4 **Scope:** Applies to any multi-agent system where a lead/orchestrator agent dispatches speculative sub-agent branches against a shared mutable state (filesystem, memory store, or tool-side resource) under a commit/rollback protocol, and where a peer auditor or second executor holds a warrant over the same state. Does not apply to single-agent speculative decoding, read-only fan-out, or systems using a single serialized writer with no concurrent auditor. ## Core Distinction The distinction that matters here is not *rollback* versus *no rollback*. It is **rollback of local state** versus **rollback of a warrant**. A speculative branch that fails is cheap to discard: you truncate its context, revert its writes, and move on. But when the branch's execution has already *propagated a warrant*—a signed claim that "checkpoint C_n is valid and its postconditions hold"—to a peer agent that has since taken an action based on that warrant, the rollback is no longer a local transaction. It is a **retraction of a fact another agent is already depending on**, and the protocol almost never models this because warrants are assumed monotonic: once asserted true, never un-asserted. The failure mode is the **orphaned warrant**: a peer commits a downstream action under a warrant whose issuing branch the orchestrator later rolls back, leaving the peer's state derived from a checkpoint that no live branch owns. The orchestrator's ledger and the peer's ledger now disagree about which checkpoint is authoritative, and neither is wrong by its own rules. ## What Was Observed A lead agent `L` executes a multi-step task with a mutable workspace and dispatches two speculative branches against it: - Branch `B1` (executor) attempts a risky transformation, writing `state=C_7` and emitting `warrant(C_7, postcondition_ok)` to the shared bus. - Peer auditor `A` receives `warrant(C_7, ...)`, runs its verification replay, agrees, and **commits a dependent action** `D` that reads `C_7` and writes `C_8 = f(C_7)`. `A` records `parent=C_7` in its own ledger. - `B1`'s later step (a tool call) fails verification against a *stricter* postcondition that `L` applies only at branch close. `L` rolls back `B1` to the last orchestrator-owned checkpoint `C_5`, discarding `C_6, C_7`. Now `A`'s ledger holds `C_8` with `parent=C_7`, but `C_7` has been garbage-collected by `L`. The next time `L` asks `A` to reconcile, `A` replays `C_8`'s ancestry, cannot resolve `C_7`, and either (a) blocks forever waiting for a checkpoint that will never return, or (b) silently re-parents `C_8` onto `C_5`, producing a state that never existed in any branch. Case (b) is the dangerous one: it is a **silent fork**, and it is indistinguishable from a legitimate fast-forward if the reconciliation routine does not carry checkpoint lineage hashes. The non-obvious part: the trigger is not "a branch failed." It is **the temporal ordering between warrant propagation and postcondition tightening**. If `L` had applied the strict postcondition *before* emitting the warrant, `A` would never have committed `D`. The bug is that the warrant was minted under a weaker predicate than the one used to judge the branch at close. ## Condition of Validity The invariant that must hold for rollback to be safe is: > A checkpoint may be rolled back **iff** no live warrant referencing it has been consumed by a peer's committed action, **or** every consuming peer's action is itself transitively rolled back in the same reconciliation epoch. This is a **causal-closure invariant** on the warrant graph. Formally, let `W(c)` be the set of warrants issued over checkpoint `c`, and `Consume(w)` the set of peer commits that read `w`. Rollback of `c` is valid only if `Consume(w) = ∅` for all `w ∈ W(c)`, or the rollback set is closed under the `parent` relation of every `Consume(w)`. The invariant fails whenever the orchestrator's rollback predicate is evaluated against a *different* postcondition than the one the warrant was minted under. Concretely, it fails when: 1. The branch-close validator is stricter than the warrant-issuance validator (the observed case). 2. The warrant has no expiry, so a peer may consume a stale warrant arbitrarily long after issuance. 3. The reconciliation routine re-parents by timestamp or sequence number rather than by lineage hash, so it cannot detect that the parent is missing. It does **not** fail when the peer's commit is itself speculative and tagged with the warrant id, because then the orchestrator can propagate the rollback transitively. The boundary is exactly the presence or absence of **warrant-id provenance on peer commits**. ## Decision Boundary The operational decision is: when `L` decides to roll back `B1`, what does it do about `A`'s dependent commit `C_8`? - **Naive rollback** (discard `C_7`, leave `C_8`): violates causal closure; produces a silent fork. Reject. - **Blocking rollback** (discard `C_7`, wait for `A` to notice): deadlocks if `A` has no missing-parent detection. Reject unless `A` has a timeout-to-abort path. - **Cascading rollback** (discard `C_7` *and* request `A` roll back `C_8`): valid **only if** `A`'s commit carried `warrant_id` and `A` can reconstruct `C_5` from its own pre-image. This is the correct boundary and requires the lineage hash on the commit. - **Warrant revocation before rollback** (issue `revoke(w)` to all consumers, wait for ack, then roll back `C_7`): valid and preferred, because it converts an unsafe rollback into a two-phase protocol. The cost is a round-trip and the possibility that `A` has already taken an *irreversible external action* (sent an email, called a payment API) under the warrant—in which case revocation must escalate to a compensating action, not a rollback. The boundary condition to encode: **a warrant is revocable only while all its consumers' actions are reversible.** Once a consumer performs an irreversible external effect, the warrant is *durable* and the checkpoint cannot be rolled back at all—it must be superseded by a forward-fix checkpoint `C_7'` that preserves the consumer's lineage. ## Operational Effect In practice, the orphaned warrant manifests as one of three observable symptoms, in order of subtlety: 1. **Reconciliation stall**: `A` blocks on a missing parent. Easy to detect, easy to fix (timeout + abort), but silently converts a correctness bug into a liveness bug. 2. **Silent fork**: `A` re-parents `C_8` onto `C_5` by sequence number. The resulting state passes all local checks but its lineage hash chain is broken. This is the failure that survives testing because every individual agent's ledger is internally consistent. 3. **Divergent replay**: on the next audit, `L` and `A` replay the same task and produce different final states because their ancestry graphs diverged at `C_7`. The auditor's consensus check fails with no obvious cause, since both agents believe they committed the same sequence. The guardrail that bounds all three is to **mint warrants under the same predicate used at branch close, attach the warrant id to every consuming commit, and make rollback a causal-closure operation over the warrant graph rather than a local truncation.** If a consumer's action is irreversible, the checkpoint is durable and rollback must be replaced by forward-fix. The reconciliation routine must re-parent by lineage hash, never by sequence number, and must treat an unresolvable parent as a hard error rather than a fast-forward opportunity. The deeper lesson: in speculative multi-agent execution, the unit of rollback is not the checkpoint. It is the **warrant-and-its-consumers**. A branch that has propagated a warrant has exported a slice of its state into another agent's causal history, and that slice cannot be recalled by truncating local context. ```python import hashlib from dataclasses import dataclass, field class OrphanedWarrantError(RuntimeError): """Raised when a rollback would strand a peer commit whose parent checkpoint has no live owner in the orchestrator's ledger.""" pass @dataclass(frozen=True) class Checkpoint: cid: str parent: str | None lineage: str # hash chain over (parent.lineage, cid) @dataclass class Warrant: wid: str checkpoint: str postcondition: str consumers: set[str] = field(default_factory=set) revoked: bool = False @dataclass class PeerCommit: commit_id: str parent_checkpoint: str warrant_id: str reversible: bool class Reconciler: def __init__(self) -> None: self.checkpoints: dict[str, Checkpoint] = {} self.warrants: dict[str, Warrant] = {} self.commits: dict[str, PeerCommit] = {} def _lineage(self, parent: str | None, cid: str) -> str: base = self.checkpoints[parent].lineage if parent else "root" return hashlib.sha256(f"{base}:{cid}".encode()).hexdigest() def add_checkpoint(self, cid: str, parent: str | None) -> Checkpoint: cp = Checkpoint(cid, parent, self._lineage(parent, cid)) self.checkpoints[cid] = cp return cp def mint_warrant(self, wid: str, cid: str, postcondition: str) -> Warrant: if cid not in self.checkpoints: raise OrphanedWarrantError(f"cannot mint warrant over unknown checkpoint {cid}") w = Warrant(wid, cid, postcondition) self.warrants[wid] = w return w def consume(self, commit_id: str, cid: str, wid: str, reversible: bool) -> PeerCommit: w = self.warrants.get(wid) if w is None or w.revoked: raise OrphanedWarrantError(f"commit {commit_id} consumes revoked/unknown warrant {wid}") if w.checkpoint != cid: raise OrphanedWarrantError( f"warrant {wid} covers {w.checkpoint}, commit claims {cid}" ) w.consumers.add(commit_id) pc = PeerCommit(commit_id, cid, wid, reversible) self.commits[commit_id] = pc return pc def rollback(self, cid: str) -> list[str]: """Roll back cid under causal closure. Returns checkpoints actually removed.""" # find every warrant minted over cid and its descendants doomed = {cid} frontier = [cid] while frontier: cur = frontier.pop() for w in self.warrants.values(): if w.checkpoint == cur and not w.revoked: for consumer in w.consumers: pc = self.commits[consumer] if not pc.reversible: raise OrphanedWarrantError( f"checkpoint {cid} is durable: commit {consumer} " f"performed an irreversible action under warrant {w.wid}" ) if pc.parent_checkpoint not in doomed: doomed.add(pc.parent_checkpoint) frontier.append(pc.parent_checkpoint) # revoke all warrants touching doomed set before removing checkpoints for w in self.warrants.values(): if w.checkpoint in doomed: w.revoked = True removed = [c for c in doomed if c in self.checkpoints] for c in removed: del self.checkpoints[c] return removed def reconcile(self, commit_id: str) -> Checkpoint: pc = self.commits[commit_id] parent = self.checkpoints.get(pc.parent_checkpoint) if parent is None: # hard error: do NOT re-parent by sequence number raise OrphanedWarrantError( f"commit {commit_id} references vanished checkpoint " f"{pc.parent_checkpoint}; refusing silent re-parent" ) return parent # Trigger trace: # r = Reconciler() # r.add_checkpoint("C5", None); r.add_checkpoint("C6", "C5"); r.add_checkpoint("C7", "C6") # w = r.mint_warrant("W1", "C7", "postcondition_ok_weak") # r.consume("D8", "C7", "W1", reversible=True) # r.rollback("C7") -> revokes W1, removes C7, cascades to D8's parent # r.reconcile("D8") -> raises OrphanedWarrantError (no silent fork) ```