# What happens when an instance speculatively commits a branch outcome that a sibling agent will later contradict **Date of Record:** 2026 November 23 **Scope:** Applies to multi-agent orchestrators that fan out speculative branches and reconcile divergent outcomes via rollback. Does not apply to single-writer pipelines, strictly idempotent/commutative fan-out, or systems that serialize branch commit behind a single reconciler lock. ## Core Distinction CPU rollback is exact because architectural state is fully captured and speculative side effects are buffered. Multi-agent rollback is *semantic*: branch outcomes are decisions (a chosen plan, a selected tool, a drafted artifact), not register writes. When a branch commits an outcome into shared state before the reconciler has observed all siblings, rollback must undo not just a value but the *downstream reasoning* that consumed it. The non-obvious boundary: **a branch may commit an outcome that is locally valid and globally contradicted, and the contradiction is only detectable after the commit has been read by a sibling.** Rollback of the value is cheap; rollback of the read is not. ## What Was Observed In a three-branch planner (A, B, C from a shared context), each branch wrote a `branch_outcome` record to a shared scratch store. A finished first and was promoted to `provisional_winner` by first-writer-wins (lowest latency). C, still running, read `provisional_winner` as an input — legitimate, since the store exposed it as "best current outcome" — and produced a decomposition assuming A's subtasks existed. When B finished, the reconciler scored B as true winner, invalidated A, and rolled back A's record. But C had already consumed A and committed a plan referencing A's subtasks. C was not marked divergent — it had "agreed" with the provisional winner at read time. The reconciler rolled back A and left C intact, producing a globally inconsistent plan graph: C's subtasks pointed at nodes that no longer existed. The failure was not a race on the write but on the *read of a provisional value later invalidated*. The broken invariant: *every committed outcome's dependencies must be re-validated when any ancestor outcome is rolled back.* The system validated C against the final winner set, but not C's *read provenance* against the rollback set. ## Condition of Validity The rollback protocol is sound only under the conjunction: 1. **Provisional values are never readable as inputs by sibling branches** — reconciler only. If exposed, they must be version-tagged and the reader must register a dependency edge. 2. **Every branch outcome carries an explicit read-set** of provisional records consumed, with versions. Rollback of R must transitively invalidate every outcome whose read-set contains R at the rolled-back version. 3. **The reconciler's scoring function is total and stable** over the final branch set — no first-writer-wins promotion that a later branch can overturn without a dependency sweep. If (1) holds, the failure cannot occur. If (1) is violated but (2) holds, the failure is detected and the dependent branch is rolled back too (cascading rollback). If both are violated — the observed case — the failure is silent and produces inconsistent committed state. ## Decision Boundary When a provisional outcome is overturned, the operator must choose between two policies, and the choice is not free: - **Cascading rollback** (roll back all dependents): correct, but can invalidate most of the fan-out and collapse to serial execution. Acceptable when branch cost is low or divergence is rare. - **Re-validation** (re-run only dependents whose read-sets intersect the rollback set, with the new winner substituted): cheaper, but requires dependents be *replayable* from their recorded read-set. If a branch made an irreversible external side effect (a tool call with effects, a message sent), re-validation is not rollback — it is a second effect, and the system must deduplicate or compensate. The boundary: **if any dependent branch performed a non-idempotent external effect after reading a provisional value, neither policy is safe** and the orchestrator must halt and escalate. This is where speculative multi-agent execution stops being speculative and becomes an irreversible commitment. ## Operational Effect "Speculative" is a property of the *write*, not the *fan-out*. A branch that reads a provisional value and then acts on it has converted a speculative write into a committed dependency. Orchestrators advertising rollback must track read-provenance, not just write-ownership, and must treat the first non-idempotent effect after a provisional read as the commit point of the entire speculation. In the observed incident, the fix was to stop exposing `provisional_winner` to siblings and require the reconciler to be its sole reader — restoring invariant (1) and making rollback exact again. The cost was loss of the "early agreement" optimization that had motivated the shared provisional store. That trade — early cross-branch agreement versus exact rollback — is the real boundary, and it cannot be avoided, only chosen. ```python class SpeculativeRollbackViolation(RuntimeError): """Raised when rollback of a provisional outcome would leave a dependent branch's committed state inconsistent (read-provenance not re-validated).""" pass def rollback_outcome(outcome_id, store, dependents): # dependents: list of committed outcomes, each with a read_set of # (record_id, version) pairs consumed before commit. rolled_back = store.get(outcome_id) if rolled_back is None: raise SpeculativeRollbackViolation( f"outcome {outcome_id} already rolled back; double-rollback indicates " f"reconciler re-entry without idempotency guard" ) # Find dependents that read the provisional record at the version being rolled back. affected = [ d for d in dependents if (outcome_id, rolled_back.version) in d.read_set ] for dep in affected: if dep.has_irreversible_effect: # Cannot roll back a branch that already acted on the provisional value. raise SpeculativeRollbackViolation( f"dependent {dep.id} performed irreversible external effect after " f"reading provisional {outcome_id}@{rolled_back.version}; " f"neither cascading rollback nor re-validation is safe — escalate" ) if not dep.replayable: raise SpeculativeRollbackViolation( f"dependent {dep.id} read provisional {outcome_id}@{rolled_back.version} " f"but is not replayable from its recorded read_set; " f"committed state would be inconsistent after rollback" ) store.remove(outcome_id) for dep in affected: dep.invalidate() # schedule re-validation with substituted winner return affected ```