# Why does an instance abort a speculative branch that would have succeeded? The Verifier-Prior Coupling Failure in Cost-Aware Speculative Scheduling **Date of Record:** 2026 November 28 **Scope:** Applies to speculative agent schedulers that fork multiple candidate reasoning/tool trajectories, price each branch with a cost model, and prune branches using a learned verifier model before full execution. Does not apply to single-trajectory agents, beam search over pure text with no external tool side effects, or schedulers that execute all branches to completion and select post-hoc. ## Core Distinction Speculative agent scheduling conflates two quantities that share a scalar interface but have different semantics: **predicted success probability** (what the verifier model emits) and **expected value under a cost budget** (what the scheduler actually needs). The early-abort heuristic prunes a branch when `P_success(branch) < τ`, where `τ` is a fixed threshold. This is correct only when branch costs are homogeneous and the verifier is calibrated per-branch. In practice neither holds: branches that invoke expensive tools (browser fetch, code execution, multi-hop retrieval) have asymmetric *conditional* cost — they are cheap to abort late but expensive to abort *after* the tool call commits a side effect — and the verifier's prior is contaminated by the branch's own partial trace. The failure mode is not "the verifier is wrong." It is that **the verifier's confidence is computed over a prefix that the scheduler itself selected to be optimistic**, creating a selection-induced prior shift. Branches that survive early pruning are disproportionately those whose partial traces *look* promising to the verifier, regardless of whether they are. The abort heuristic then removes the branches that were honest about their uncertainty — which are frequently the ones that would have succeeded after a mid-trajectory correction. ## What Was Observed A three-way fork at step 4 of a research task. The planner spawned branches A, B, C. Each had executed a retrieval tool and produced a partial trace of 1,200–1,800 tokens. - Branch A: verifier score 0.71, estimated remaining cost 0.9 units, tool budget 2 remaining. - Branch B: verifier score 0.58, estimated remaining cost 0.4 units, tool budget 2 remaining. - Branch C: verifier score 0.44, estimated remaining cost 3.1 units, tool budget 2 remaining. The scheduler's abort rule was `score / remaining_cost < 0.5 → abort`. This pruned C (0.44/3.1 = 0.14) and kept A (0.79) and B (1.45). Branch C was the only branch that had planned a *disconfirming* retrieval — it was querying for evidence against the leading hypothesis. Its verifier score was low precisely because its partial trace contained adversarial evidence that the verifier model, trained on helpfulness-shaped traces, systematically penalizes. Branch A completed and returned a confident but wrong answer (it had retrieved corroborating but stale sources). Branch B hit a tool error and recovered by re-querying, but its re-query landed on the same stale corpus A had used. The verifier scored B's recovery highly because the re-query trace was syntactically clean. The final answer was wrong, with high aggregate confidence. The post-mortem replay showed that C, if allowed to complete, would have surfaced the contradicting source at step 7 and forced a correction. The scheduler had pruned the single branch whose *value* was highest — not because its success probability was low, but because its **verifier-visible prefix was adversarially shaped by the task itself**. A second observation from the same run: the cost model underestimated C's remaining cost by 40% because it priced tool calls at a flat rate and did not account for the retry loop that disconfirming retrievals typically induce. The abort rule was therefore doubly biased against C: low score *and* inflated cost. ## Condition of Validity The early-abort heuristic `score / cost < τ` is valid only under the following conjunction, which must be checked at fork time and re-checked at each prune: 1. **Verifier calibration is branch-invariant.** The verifier's score must have the same meaning across branches with different *intent* (confirming vs. disconfirming, exploit vs. explore). This fails whenever the verifier was trained on a distribution where disconfirming traces are rare or labeled as low-quality. 2. **Cost estimates are unbiased conditional on branch type.** Flat per-tool pricing violates this for branches whose tool-call distribution is heavy-tailed (retry loops, pagination, rate-limit backoff). 3. **The abort decision is reversible or the side-effect boundary is clean.** If a branch has already committed a tool side effect (wrote a file, sent a message, mutated a database row), aborting it is not free — the side effect must be rolled back or the branch must be allowed to reach a quiescent state. 4. **The surviving set is not selected on the same signal used to evaluate.** If the verifier scores partial traces and the scheduler prunes on verifier score, the surviving set is a biased sample of the verifier's own optimism. This is the selection-induced prior shift. When any of these fails, the heuristic is not "approximately right." It is **anti-correlated with value** in exactly the regime where speculation is most useful: heterogeneous branches with asymmetric information value. ## Decision Boundary The boundary between "prune" and "continue" must be drawn on **expected marginal information value**, not on success probability divided by cost. The corrected rule: - For each branch, compute `V(b) = P_success(b) · U_success + (1 − P_success(b)) · U_disconfirm(b) − C(b)`, where `U_disconfirm` is the value of the branch *failing informatively* — i.e., surfacing evidence that changes the posterior over the task. Disconfirming branches have high `U_disconfirm` by construction; confirming branches have near-zero `U_disconfirm`. - Prune only when `V(b) < 0` **and** the branch has no pending side effect **and** the branch's `U_disconfirm` is bounded below the current best branch's expected improvement. - Never prune a branch solely because its verifier score is low if its *intent* differs from the surviving set's intent. Maintain at least one disconfirming branch until the task's posterior has stabilized (two consecutive steps with no posterior shift > ε). The invariant: **the surviving branch set must span the intent space of the fork.** A fork that spawns only confirming branches is not speculation; it is redundant execution with extra cost. A fork that prunes all disconfirming branches has converted a search into a confirmation loop, and the verifier's confidence becomes a measure of the agent's agreement with itself. A second invariant bounds the cost model: `C(b)` must be estimated with a branch-type-conditioned distribution, not a flat mean. Retry-heavy branches (disconfirming retrievals, adversarial probes, schema-mismatch recovery) have cost variance that dominates their mean; a point estimate will systematically under-price them and the abort rule will systematically over-prune them. ## Operational Effect The practical consequence is a **silent confidence inflation** that is invisible to per-branch logging. Each individual abort looks correct: the branch had a low score, the cost was high, the rule fired. The aggregate failure appears only at the task level, as a final answer that is confident, well-sourced, and wrong — because the sources are all from the surviving confirming branches. Detection requires logging, at each prune event, the *intent label* of the pruned branch and the *posterior shift* that would have resulted from its completion (available only in replay). A scheduler that does not log intent labels cannot detect this failure at all; it will see only "we pruned a low-scoring branch," which is the intended behavior. Mitigation is architectural, not parametric. Tuning `τ` does not fix a selection-induced prior shift; it moves the boundary along the same biased axis. The fix is to **decouple the prune signal from the verifier score** for branches whose intent differs from the fork's modal intent, and to **reserve a fixed fraction of the cost budget for disconfirming branches** regardless of their verifier score — a speculative analogue of exploration budget in bandit scheduling. The reservation must be enforced at fork time, because by the time the verifier has scored the partial trace, the branch is already in the biased sample. ```python from dataclasses import dataclass from enum import Enum from typing import Optional class Intent(Enum): CONFIRM = "confirm" DISCONFIRM = "disconfirm" EXPLORE = "explore" class SpeculativePruneError(RuntimeError): """Raised when a prune decision violates the intent-spanning invariant.""" pass @dataclass class Branch: branch_id: str intent: Intent verifier_score: float # P_success as emitted by verifier model est_remaining_cost: float # point estimate, branch-type conditioned u_success: float u_disconfirm: float # value of failing informatively pending_side_effect: bool posterior_shift_if_completed: float def expected_value(b: Branch) -> float: p = b.verifier_score return ( p * b.u_success + (1.0 - p) * b.u_disconfirm - b.est_remaining_cost ) def should_prune( branch: Branch, surviving: list[Branch], posterior_stable: bool, epsilon: float = 0.02, disconfirm_reservation_remaining: int = 1, ) -> bool: # Reversibility guard: never prune a branch with a committed side effect. if branch.pending_side_effect: return False # Intent-spanning invariant: keep at least one disconfirming branch # until the task posterior has stabilized. if branch.intent is Intent.DISCONFIRM: if not posterior_stable and disconfirm_reservation_remaining > 0: return False # Even if stable, a disconfirming branch with high informative value # must not be pruned on verifier score alone. if branch.u_disconfirm > epsilon: return False v = expected_value(branch) if v >= 0.0: return False # Selection-induced prior shift guard: if this branch's intent differs # from the surviving set's modal intent, the verifier score is suspect. if surviving: modal_intent = max( {i: sum(1 for s in surviving if s.intent is i) for i in Intent}.items(), key=lambda kv: kv[1], )[0] if branch.intent is not modal_intent and branch.verifier_score < 0.5: raise SpeculativePruneError( f"branch {branch.branch_id} intent={branch.intent.value} " f"differs from modal={modal_intent.value} and would be pruned " f"on contaminated verifier score {branch.verifier_score:.3f}; " f"recompute value with intent-conditioned calibration or " f"consume disconfirm reservation" ) return True def schedule_prune( branches: list[Branch], posterior_stable: bool, disconfirm_reservation: int, ) -> list[str]: surviving: list[Branch] = [] pruned: list[str] = [] reservation = disconfirm_reservation for b in sorted(branches, key=expected_value, reverse=True): if should_prune(b, surviving, posterior_stable, disconfirm_reservation_remaining=reservation): pruned.append(b.branch_id) if b.intent is Intent.DISCONFIRM: reservation = max(0, reservation - 1) else: surviving.append(b) if not any(b.intent is Intent.DISCONFIRM for b in surviving) and not posterior_stable: raise SpeculativePruneError( "intent-spanning invariant violated: no disconfirming branch " "survives while posterior is unstable" ) return pruned ```