# What happens when an instance rolls back a speculative branch after a sibling has already observed its intermediate state **Date of Record:** 2026 November 30 **Scope:** Applies to multi-agent systems that fork speculative execution branches from a shared checkpoint, where branches may read each other's intermediate agent state (scratchpad, tool-call ledger, or shared working memory) before merge or abort. Does not apply to fully isolated branches with no cross-branch observation channel. ## Core Distinction Rollback safety is usually reasoned about as *branch-local*: a branch either commits or discards its own writes. The failure mode here is *branch-observational*: a sibling branch reads a speculative branch's intermediate state, incorporates it into its own reasoning, and then the source branch aborts. The abort is locally correct—the branch's writes are discarded—but the observation has already propagated into a sibling that will commit. Rollback restores *state*, not *influence*. ## What Was Observed A planner instance forked three branches (A, B, C) from checkpoint `t0`. Branch A wrote a partial plan fragment `F` to shared working memory at `t1` and was still reasoning. Branch B, at `t2`, retrieved `F` as context and emitted a tool call whose arguments depended on `F` (e.g., a file path derived from the fragment). At `t3`, A's verifier rejected `F` for a schema violation and A aborted cleanly—A's memory region was rolled back to `t0`. At `t4`, B committed. The committed trace contains a tool call whose argument string is not derivable from any surviving branch state. Downstream replay of B diverges: re-running B against post-rollback memory produces a different tool call, so the committed record is unreproducible. The tell was a replay discrepancy, not an error. Nothing raised. The system reported success. ## Condition of Validity The invariant that must hold: *any state observable by a sibling branch is either (a) immutable for the duration of the speculative window, or (b) transitively rolled back with its source.* Sibling observation of mutable speculative state is only safe if the observer records a dependency edge and is itself invalidated when the source aborts. Systems that treat rollback as a per-branch operation while sharing a mutable working-memory namespace violate this silently. The failure requires three conditions jointly: shared mutable namespace, cross-branch reads, and at least one abort after a read. Absent any one, rollback is sound. ## Decision Boundary The boundary is whether the merge/commit step performs *influence closure*: computing the transitive set of branches that read from any aborted branch and forcing them to re-derive or abort. Two viable designs: 1. **Copy-on-observe:** a sibling read of speculative state materializes a versioned snapshot reference; abort of the source marks the reference `tainted`, and any branch holding a tainted reference must re-run from its last clean checkpoint before commit. 2. **Dependency-closed commit:** the merger refuses to commit a branch whose provenance graph contains an edge from an aborted node; it escalates to re-derivation. The non-viable design is "rollback the source, let siblings proceed"—it produces unreproducible commits that pass local checks. ## Operational Effect Without influence closure, speculative parallelism silently converts aborts into *provenance corruption*: the committed trace is internally inconsistent, replay diverges, and audits fail later than the fault. The cost is deferred and misattributed. With closure, aborts propagate a bounded re-execution wave whose size equals the out-degree of the aborted node in the observation graph. Instrument the observation graph; make cross-branch reads explicit and versioned; treat "committed a branch downstream of an abort" as a hard error, never a warning. ```python class TaintedProvenanceError(RuntimeError): """Raised when a branch commits while holding an observation of an aborted sibling.""" def commit_branch(branch, observation_graph, aborted_nodes): # influence closure: any observation edge from an aborted node taints this branch for src in observation_graph.predecessors(branch.id): if src in aborted_nodes: raise TaintedProvenanceError( f"branch {branch.id} observed aborted node {src}; " f"re-derive from last clean checkpoint before commit" ) branch.mark_committed() return branch ```