# When must an instance abandon a speculative branch: reconciliation deadlock under partial quorum loss **Date of Record:** 2026 November 29 **Scope:** Applies to orchestrators that fan out speculative agent branches (parallel plan attempts, redundant tool executions, draft-and-critique trees) and reconcile them by quorum or majority vote. Does not apply to strictly sequential single-agent loops or to branches that share no writable state. ## Core Distinction The failure is not "a branch died." Branches die constantly and reconciliation is designed for that. The failure is **a live branch whose completion certificate is unverifiable because the quorum that would validate it has itself partially failed** — leaving the branch in a state that is neither committed nor abortable. The critical distinction is between *branch failure* (the branch's own output is wrong or absent) and *reconciliation failure* (the collector cannot decide whether a correct branch is correct, because the auditors it would ask are exactly the ones that went down). Conventional retry logic treats both as "transient" and re-dispatches, which is precisely the wrong move: re-dispatching a live-but-unverifiable branch duplicates side effects while the original branch may still commit. ## What Was Observed A three-branch speculative planner (branches A, B, C) with a two-of-three auditor panel (auditors X, Y, Z) was reconciling a write-ahead plan. Branch B completed with a valid result and submitted its certificate to auditors X and Y. Auditor Y timed out mid-verification (hung on a downstream tool call), auditor X returned `VALID`, auditor Z was never consulted because the collector's quorum window had already closed. The collector saw one `VALID`, one timeout, and concluded "quorum not reached → re-dispatch B." B re-ran, producing a byte-identical plan but a *different* idempotency token, and both the original B and the re-dispatched B' attempted to commit. The commit path had no deduplication on plan content, only on token, so the plan was applied twice. The non-obvious part: the collector's quorum logic was *correct* in isolation. The bug was that "quorum not reached" conflated two different states — `INSUFFICIENT_VOTES` (too few auditors responded) and `INSUFFICIENT_VALID_VOTES` (auditors responded, verdict was negative). Only the second is grounds for re-dispatch. The first is grounds for *waiting or escalating*, because the missing vote may be the one that would have committed the branch. ## Condition of Validity The invariant that bounds this failure: **a speculative branch may only be re-dispatched when its previous attempt has been proven non-committing.** Proof requires either (a) a definitive negative verdict from a full quorum, or (b) an explicit lease expiry on the branch's commit token, observed by the collector. Absent either, the branch is in an `UNRESOLVED` state and must be held, not re-run. This invariant holds only when the commit path is idempotent on a stable branch identity that survives re-dispatch. If branch identity is regenerated per attempt (as in the observed case), the invariant is violated at the identity layer and no amount of quorum logic will save it. So the validity condition is conjunctive: stable branch identity AND lease-based commit tokens AND a three-valued quorum result (`COMMITTED` / `REJECTED` / `UNRESOLVED`). ## Decision Boundary The boundary is between *escalate* and *re-dispatch*, and it is crossed at the moment the collector's quorum window closes with at least one auditor unresponsive but zero negative verdicts. At that point: - If the unresponsive auditor's lease has expired and the collector can observe the expiry → re-dispatch is safe (the branch cannot commit). - If the unresponsive auditor's lease is still live → the branch may commit at any moment; re-dispatch creates a race. - If the collector cannot observe lease state (partitioned from the lease store) → the branch is `UNRESOLVED` and must be escalated to a human or a higher-quorum tier, never re-dispatched. The failure mode is that most collectors treat "cannot observe lease state" as equivalent to "lease expired," because the observation call returns an error and the error path defaults to retry. That default is the bug. ## Operational Effect The downstream effect is not a crash but a **silent double-commit** that only surfaces when the duplicated side effect is later read back — often hours later, in a different task, when the plan's second application overwrites state the first application had already mutated. Reconciliation appears to have succeeded (the plan is present, the branch is marked done), so no alarm fires. The only reliable detection is a content-hash audit on the commit log, comparing committed plans against the set of live branch identities at commit time. Operationally, the guardrail is to make the collector's quorum result three-valued and to refuse re-dispatch unless the branch's commit lease is *observed* expired, not *assumed* expired on error. ```python import hashlib from dataclasses import dataclass from enum import Enum class ReconciliationError(RuntimeError): pass class Verdict(Enum): VALID = "valid" INVALID = "invalid" TIMEOUT = "timeout" class QuorumState(Enum): COMMITTED = "committed" REJECTED = "rejected" UNRESOLVED = "unresolved" @dataclass(frozen=True) class BranchCertificate: branch_id: str # stable across re-dispatch — the identity invariant attempt: int content_hash: str commit_token: str # lease-bound, changes per attempt def stable_branch_id(plan_text: str) -> str: # Identity derived from content, not from dispatch order. return hashlib.sha256(plan_text.encode()).hexdigest()[:16] def reconcile( cert: BranchCertificate, verdicts: dict[str, Verdict], quorum_size: int, lease_observed_expired: bool, lease_observable: bool, ) -> QuorumState: valid = sum(1 for v in verdicts.values() if v is Verdict.VALID) invalid = sum(1 for v in verdicts.values() if v is Verdict.INVALID) timeouts = sum(1 for v in verdicts.values() if v is Verdict.TIMEOUT) needed = (quorum_size // 2) + 1 if valid >= needed: return QuorumState.COMMITTED if invalid >= needed: return QuorumState.REJECTED if timeouts > 0 and not lease_observable: # Cannot prove the branch is non-committing. Do not re-dispatch. raise ReconciliationError( f"branch {cert.branch_id} attempt {cert.attempt}: " f"{timeouts} auditor(s) unresponsive and lease unobservable; " f"state UNRESOLVED, escalate rather than re-dispatch" ) if timeouts > 0 and not lease_observed_expired: # Lease still live: branch may commit at any moment. raise ReconciliationError( f"branch {cert.branch_id} attempt {cert.attempt}: " f"lease still live despite {timeouts} timeout(s); " f"re-dispatch would race the original commit" ) return QuorumState.UNRESOLVED ```