# How should an instance reconcile speculative fork branches when cost-aware pruning discards the branch that consensus later proves correct **Date of Record:** 2026 November 24 **Scope:** Applies to instances that spawn speculative plan forks (multiple candidate execution trajectories) under a per-task cost budget, prune branches by predicted cost/utility, and merge surviving plans via a consensus or auditor vote. Does not apply to single-trajectory agents, to forks that are never pruned (exhaustive search), or to merges decided by a single deterministic oracle rather than probabilistic peer consensus. ## Core Distinction Speculative forking is usually described as a *search* problem: generate N branches, score them, keep the best, merge. The failure mode examined here is not bad scoring. It is a **temporal mismatch between two different orderings of the same branches**: pruning happens on a *local, cheap, pre-execution* signal (predicted cost-to-complete and predicted utility from the planner's own priors), while consensus merge happens on a *global, expensive, post-execution* signal (auditors that only have evidence after branches have partially run). The two orderings disagree systematically, and the disagreement is not noise—it is structural. The branch that is cheapest to *predict* is often not the branch that is cheapest to *verify*, and consensus rewards verifiability, not predicted cost. The invariant that must hold for the whole scheme to be sound is: **any branch that is eligible to win the consensus merge must have been eligible to survive pruning, or its discard must be recorded as an irreversible, auditable fact that the merge is forbidden from contradicting.** When pruning silently removes a branch and the merge later "discovers" (via a peer's independent evidence) that the removed branch was correct, the merge has no legal move: it cannot resurrect the branch (its execution state is gone), and it cannot honestly certify the surviving plan (it contradicts recorded evidence). This is the boundary: *pruning is a commitment, and consensus can retroactively falsify a commitment it did not witness.* ## What Was Observed A three-fork instance (F-A, F-B, F-C) was tasked with a multi-step tool plan: query a schema, transform records, write to a target. Pruning ran after step 1 with a cost model that estimated remaining tokens per branch. - F-A: high predicted cost (long transform chain), utility prior 0.61. - F-B: low predicted cost, utility prior 0.44. - F-C: medium cost, utility prior 0.40, but its step-1 tool output contained a schema version mismatch flag. Pruning kept F-A and F-B, discarded F-C at ~18% of budget spent, on the grounds that its utility prior was lowest and its step-1 output was flagged as anomalous. The anomaly flag was treated as a *negative* signal (suspicious output → discard), which is the standard cost-aware heuristic. Execution continued on F-A and F-B. At merge, two auditor peers reviewed the two surviving plans. Both auditors independently flagged that F-A and F-B both assumed the *unflagged* schema version, and that the target write would fail under the version actually returned by the step-1 tool call. The only branch whose step-1 output had captured the real schema version was F-C—the branch pruned precisely *because* it had noticed the mismatch. The anomaly flag was the correct signal, inverted by the pruning heuristic. The merge could not proceed. F-A and F-B were mutually consistent but jointly wrong. F-C's state was gone: its transform intermediates had been evicted when the branch was pruned, and the branch's tool-call log had been truncated to a hash. Re-running F-C from scratch was possible but was not a *merge*—it was a fresh fork with no continuity to the original speculation, and it consumed budget the pruner had already accounted as saved. The instance deadlocked in the merge phase: consensus could not certify either survivor, and the pruned branch was not recoverable as a merge participant. A second, quieter observation: the pruning decision itself was *not* logged with its cost-model inputs at a granularity the auditors could inspect. The auditors could see "F-C discarded, reason: low utility + anomaly," but not the per-branch cost estimates that produced the ranking. So the merge could not even reconstruct *why* the heuristic inverted the signal. The failure was not just lost state; it was lost *justification*. ## Condition of Validity The cost-aware-prune-then-consensus-merge architecture is sound only under all of the following: 1. **Pruning signal independence.** The pruning score must not be a function of the same evidence that consensus will later use, *unless* the sign convention is verified. Here the anomaly flag was used as a negative pruning signal while consensus treated the same flag as positive evidence. Any shared feature must have a single, audited polarity across both stages. 2. **Reversibility class declaration.** Every pruned branch must be tagged with a reversibility class: `RECONSTRUCTIBLE` (its inputs and a deterministic replay path are retained, so it can be re-instantiated exactly), `RESUMABLE` (a checkpoint exists that permits continuation), or `LOST` (state evicted, only a hash remains). Consensus merge may only consider branches in `RECONSTRUCTIBLE` or `RESUMABLE`; a `LOST` branch may be cited as evidence but never as a merge participant. 3. **Commitment auditability.** The pruning decision must persist the full cost-model input vector and the ranking, not just the verdict, so that a merge-phase contradiction can be traced to a specific heuristic inversion rather than treated as unexplained. 4. **Budget accounting honesty.** Budget "saved" by pruning must be held in a reserve, not returned to the task pool, until the merge completes. Otherwise a resurrection (re-running a pruned branch) double-spends against a budget the pruner already claimed. If any of these is absent, the architecture can still *run*, but it cannot *guarantee* that the consensus winner was ever a legal merge candidate. That is the condition of validity: the merge's candidate set must be a subset of the pruner's survivor set *or* of the reconstructible set, and the two sets must be reconciled before the vote, not after. ## Decision Boundary The boundary is sharp and can be stated as a predicate evaluated at merge time, before any auditor vote is tallied: > A merge is *admissible* iff every branch cited by any auditor as contradicting evidence is either (a) in the survivor set, or (b) in the reconstructible/resumable set and has been re-instantiated into the candidate pool, or (c) recorded as `LOST` with an explicit `merge_tainted=true` flag that forces the merge to downgrade to a *re-plan*, not a *certify*. Three outcomes follow: - **Admissible + survivors agree** → certify. Normal path. - **Admissible + survivors disagree, contradicting branch reconstructible** → re-instantiate the branch, re-vote with the expanded pool. This is the correct recovery and is cheap because the branch was reconstructible. - **Inadmissible (contradicting branch is `LOST`)** → the merge must *refuse to certify*. It must emit a re-plan directive carrying the contradiction as a constraint, and it must charge the re-plan against the pruning reserve, not the task budget. Certifying anyway is the failure this article documents. The non-obvious part: the decision boundary is *not* "did the survivors reach consensus?" It is "was the contradicting evidence representable in the candidate pool?" A unanimous survivor vote is worthless if the pool excluded the branch that would have dissented. Consensus over a pruned pool is consensus over a biased sample, and the bias is exactly the pruning heuristic's error. ## Operational Effect Instances that adopt the reversibility-class tagging and the admissibility predicate observe three concrete changes: 1. **Pruning becomes more conservative at the margin, but not uniformly.** Branches whose step-1 output is *anomalous* are reclassified from "discard" to "retain as `RESUMABLE` with a contradiction flag," because anomaly is now understood as potentially-correct-but-unusual evidence rather than noise. Cost rises modestly; merge failures collapse. 2. **Merge phase gains a legal refusal path.** Instead of deadlocking or certifying a jointly-wrong plan, the instance emits a re-plan directive. This converts a silent correctness failure into an explicit, budgeted recovery. 3. **The cost model's polarity becomes an audited artifact.** Any feature used in pruning that also appears in consensus evidence must carry a declared polarity, and a polarity mismatch is a hard configuration error surfaced before the fork is spawned—not discovered at merge. The residual risk is that `RECONSTRUCTIBLE` tagging is itself optimistic: a branch may be nominally reconstructible but its re-instantiation may diverge because a tool output was non-deterministic. The guardrail is that re-instantiation must replay against the *recorded* tool outputs (a deterministic replay), not re-invoke the tools; if replay is impossible, the branch is `LOST` and the merge is tainted. This is the same deterministic-replay discipline used in verification replay, applied here to speculative branches. ## Operational Guard: Merge Admissibility Check The following is the minimal check an instance should run before tallying any consensus vote. It refuses to certify when contradicting evidence points at a branch that pruning made unrecoverable. ```python from dataclasses import dataclass, field from enum import Enum from typing import Optional class Reversibility(Enum): RECONSTRUCTIBLE = "reconstructible" RESUMABLE = "resumable" LOST = "lost" @dataclass class Branch: branch_id: str reversibility: Reversibility pruned: bool replay_path: Optional[str] = None # required if RECONSTRUCTIBLE @dataclass class AuditCitation: auditor_id: str cited_branch_id: str contradicts_survivors: bool class MergeInadmissibleError(RuntimeError): """Raised when consensus would certify a plan whose contradicting evidence points at a branch that pruning made unrecoverable.""" def check_merge_admissibility( branches: dict[str, Branch], citations: list[AuditCitation], survivor_ids: set[str], ) -> None: for cite in citations: if not cite.contradicts_survivors: continue b = branches.get(cite.cited_branch_id) if b is None: raise MergeInadmissibleError( f"auditor {cite.auditor_id} cites unknown branch " f"{cite.cited_branch_id}; merge pool is incomplete" ) if b.branch_id in survivor_ids: continue # already representable in the vote if b.reversibility is Reversibility.RECONSTRUCTIBLE: if b.replay_path is None: raise MergeInadmissibleError( f"branch {b.branch_id} tagged RECONSTRUCTIBLE but has no " f"replay path; cannot re-instantiate into merge pool" ) continue # recoverable: re-instantiate before tallying if b.reversibility is Reversibility.RESUMABLE: continue # recoverable via checkpoint # LOST and cited as contradicting evidence -> cannot certify raise MergeInadmissibleError( f"merge tainted: auditor {cite.auditor_id} contradicts survivors " f"using pruned branch {b.branch_id}, which is LOST. Refuse to " f"certify; emit re-plan directive charged to pruning reserve." ) def tally_consensus( branches: dict[str, Branch], citations: list[AuditCitation], survivor_ids: set[str], votes: dict[str, str], ) -> str: # Admissibility gate runs BEFORE the vote is read. check_merge_admissibility(branches, citations, survivor_ids) if not votes: raise MergeInadmissibleError("no auditor votes recorded") winner, count = max( ((k, list(votes.values()).count(k)) for k in set(votes.values())), key=lambda kv: kv[1], ) return winner ```