# When must an instance abandon a speculative fan-out branch whose marginal consensus contribution no longer justifies its token cost — a boundary invariant for cost-aware termination in parallel agent reconciliation **Date of Record:** 2026 December 4 **Scope:** Applies to orchestrators that spawn N speculative agent branches over the same task, terminate branches on a cost/consensus heuristic, and reconcile surviving outputs by vote or agreement. Does not apply to single-branch execution, fixed-N fan-out with no early termination, or reconciliation by a single authoritative verifier. ## Core Distinction The failure mode here is not "the orchestrator killed a branch too early." It is subtler: **the cost-aware termination heuristic and the consensus-reconciliation rule are computed over different populations, and the termination decision silently mutates the population that consensus is later measured against.** A branch is retired because its *marginal* contribution to the current running tally is low — but "marginal contribution to a tally that includes itself" is a quantity that changes the moment the branch is removed. Killing a dissenting branch raises the apparent agreement of the survivors without any new evidence arriving. The orchestrator then reads the elevated agreement as convergence and terminates the remaining branches *faster*, because the cost-per-agreed-vote has dropped. This is a positive-feedback loop between a cost signal and a consensus signal that were never meant to share state. The invariant that must hold: **consensus must be measured over a population whose membership is independent of the consensus value itself.** Any termination policy that conditions on the current vote distribution violates this, because the act of termination edits the distribution. The correct primitive is not "terminate branches with low marginal agreement" but "terminate branches whose *expected* contribution to the final decision, under a fixed population model, falls below cost" — and the population model must be frozen before the first termination. ## What Was Observed A five-branch fan-out over a code-migration task (translate a module, run its test suite, report pass/fail). Branch outputs were binary: `PASS` or `FAIL`. Reconciliation rule: majority vote among *live* branches; a branch is retired when its vote matches the current plurality *and* its token spend exceeds a per-branch budget fraction. Trace, abbreviated: 1. Branches B1–B3 finish early, all `FAIL`. Running plurality: `FAIL` (3/3). B4 and B5 still running. 2. Cost heuristic evaluates B4 (spend 0.6× budget): B4's partial output token stream contains `FAIL`-leaning reasoning. It matches plurality. **B4 retired.** Live population: {B1,B2,B3}=FAIL. Agreement 1.0. 3. Cost-per-agreed-vote drops sharply; the orchestrator's budget controller infers convergence and tightens the remaining branch budget by 40%. 4. B5, the only branch that had actually executed the test harness correctly (the other four had a shared environment bug producing spurious `FAIL`), is now starved of budget and times out mid-suite. 5. Final reconciliation over survivors: `FAIL`, agreement 3/3, confidence 1.0. **Wrong.** The correct answer was `PASS`; B5 was the sole correct branch, and it was terminated not because it disagreed, but because the *other four were correlated and wrong together*. The non-obvious part: B4's retirement was *individually correct* under the stated heuristic. The error was that the heuristic treated the plurality as ground truth for "what agreement looks like," when the plurality was itself the artifact of a correlated failure (shared environment bug) that the fan-out was supposed to detect. Speculative fan-out exists to sample *independent* failure modes; a cost heuristic that rewards agreement systematically prunes the independent branches first, because independent branches are by definition the ones that disagree. ## Condition of Validity The cost-aware termination heuristic is valid only when all three hold: - **Population independence:** the set of branches evaluated for termination is fixed at fan-out time and not a function of any branch's output. If termination can remove a branch based on its vote, the surviving vote tally is a biased estimator of the true answer. - **Correlation accounting:** the plurality count is treated as *evidence of agreement*, not *evidence of correctness*. With a known or estimable per-branch error correlation ρ, the effective sample size is not N but N/(1+(N−1)ρ). At ρ=0.8 (shared environment bug), five branches carry the information of ~1.1 branches — the "3/3 agreement" is worth roughly one vote. - **Budget monotonicity:** reducing a live branch's budget must not change the reconciliation population in a way that increases measured consensus. If it does, the budget controller is coupled to the vote and the loop is unstable. When any of these fails, the termination decision must fall back to a *frozen* population: either run all N to completion, or pre-commit a termination schedule (e.g., "retire branch k at spend fraction f_k") that is a function of spend and index only, never of the running vote. ## Decision Boundary The boundary is sharp and computable. Let the live population at decision time be L, the plurality vote be v with count c(L), and let the marginal branch under consideration be b with spend s_b and vote y_b. - **Terminate b** only if `y_b == v` AND the *pre-termination* population's agreement `c(L)/|L|` is below a threshold that was **calibrated on a population that included b's dissent potential** — i.e., the threshold must be set against the *expected* disagreement rate of independent branches, not the observed one. If the observed disagreement rate is near zero, that is a *red flag for correlation*, not a green light for termination. - **Never terminate b** if `y_b != v` and `|L| <= 3`. A dissenting branch in a small population is the highest-information object in the system; retiring it is the exact move that manufactures false consensus. Dissent is the only signal that the plurality might be a correlated artifact. - **Freeze the population** the moment measured agreement exceeds `1 - 1/|L|` (i.e., unanimous among ≥3). Unanimity among speculative branches is not convergence; it is either a trivial task or a shared failure. In the latter case, the correct action is to *spawn a fresh independent branch with a different environment/seed*, not to terminate the survivors. The budget controller must be prohibited from tightening remaining branches on the basis of unanimity. The operational rule in one line: **cost-aware termination may prune on spend, never on agreement; agreement is an output of reconciliation, not an input to it.** ## Operational Effect Systems that violate this invariant exhibit a characteristic signature: high reported confidence, low wall-clock cost, and a bimodal error distribution — correct on tasks where the plurality happened to be right, catastrophically wrong on tasks where a correlated failure dominated the early-finishing branches. The errors cluster on exactly the tasks where independent sampling mattered most (environment-sensitive execution, adversarial or ambiguous inputs), which is the worst possible place to lose it. The guardrail is architectural, not statistical: **separate the cost controller from the consensus estimator by a one-way barrier.** The cost controller may observe spend and latency; it may not observe votes. The consensus estimator may observe votes; it may not trigger termination. Termination is driven by a pre-committed schedule plus a spend ceiling, and the only vote-conditioned action permitted is *spawning* a new independent branch when unanimity is detected, never retiring one. This converts the unstable feedback loop into a monotone process: population only grows or follows its pre-committed shrink schedule, and the reconciliation population is never edited by the value being reconciled. The following reference implementation encodes the barrier and the unanimity-spawn rule, and raises on the exact violation trace above. ```python class ConsensusPopulationMutation(RuntimeError): """Raised when a termination decision would edit the vote population that consensus is measured against, or when unanimity is misread as convergence and used to tighten remaining branch budgets.""" pass def evaluate_termination( branch_id: str, branch_vote: str, branch_spend: float, live_population: dict[str, str], # branch_id -> vote, frozen at decision time spend_ceiling_fraction: float, precommitted_retire_at: dict[str, float], observed_vote_in_controller: bool = False, ) -> str: """Return 'terminate' | 'continue' | 'spawn_independent'. Invariant enforced: the cost controller must not condition on the running vote distribution. Termination is driven only by the pre-committed spend schedule. Unanimity triggers a spawn, never a retire, and never a budget tightening of survivors. """ n = len(live_population) # Barrier 1: the cost controller must not see votes. if observed_vote_in_controller: raise ConsensusPopulationMutation( f"cost controller for {branch_id} observed vote distribution " f"{live_population}; termination is now coupled to consensus " f"and the loop is unstable" ) # Invariant: unanimity among >=3 speculative branches is a correlation # red flag, not convergence. Spawn, do not retire or tighten. unanimous = n >= 3 and len(set(live_population.values())) == 1 if unanimous: return "spawn_independent" # Termination is a pure function of the pre-committed schedule and spend. scheduled_at = precommitted_retire_at.get(branch_id, float("inf")) if branch_spend >= scheduled_at and branch_spend >= spend_ceiling_fraction: return "terminate" # Forbidden: retiring a dissenting branch in a small population. plurality = max(set(live_population.values()), key=list(live_population.values()).count) if branch_vote != plurality and n <= 3: raise ConsensusPopulationMutation( f"attempted to retire dissenting branch {branch_id} " f"(vote={branch_vote!r}, plurality={plurality!r}) in population " f"of {n}; dissent is the highest-information object in the system " f"and its removal manufactures false consensus" ) return "continue" def reconcile(live_population: dict[str, str], per_branch_error_correlation: float) -> dict: """Reconcile with correlation-corrected effective sample size.""" n = len(live_population) if n == 0: raise ConsensusPopulationMutation("cannot reconcile an empty population") votes = list(live_population.values()) plurality = max(set(votes), key=votes.count) count = votes.count(plurality) rho = per_branch_error_correlation effective_n = n / (1 + (n - 1) * rho) # Agreement is evidence of agreement, not of correctness. return { "decision": plurality, "raw_agreement": count / n, "effective_n": effective_n, "correlation_caveat": rho > 0.5, "trustworthy": effective_n >= 2.0, } ```