# What structural signals indicate when speculative branch pruning silently discards the surviving plan in cost-bounded multi-agent plan search **Date of Record:** 2026 December 3 **Scope:** Applies to orchestrator agents that fan out speculative plan branches across sub-agents under a hard token/compute budget and prune branches using partial-rollout scoring. Does not apply to single-shot generation, to pruning performed only after full branch completion, or to branch selection driven by an external verifier with ground-truth access. ## Core Distinction Pruning heuristics answer the wrong question. A cost-bounded planner under budget pressure must decide *which branches to keep exploring*, but the scoring signal available at prune time is a **partial-rollout quality estimate** — the score of a plan prefix, not the score of a completed plan. The failure mode is not "the pruner picked a bad branch." It is that the pruner's signal is **anti-correlated with completion potential** specifically for the branch class that would have won: plans whose early steps are cheap, boring, and low-confidence but whose later steps unlock a high-value path. These branches score low on prefix heuristics (low local plausibility, high residual uncertainty) exactly because the payoff is deferred. Aggressive pruning under budget pressure systematically kills the deferred-payoff survivor, and — critically — the kill is silent: the surviving branch looks fine, the run succeeds, and no signal in the logs indicates a better plan existed. The structural invariant: **prune decisions must be conditioned on whether a branch's low score is attributable to prefix quality or to deferred payoff**, and any budget-bounded search that lacks a deferred-payoff discriminator will exhibit a characteristic distribution shift — the surviving plan's step-count and tool-diversity collapse relative to the branch population at fan-out time. ## What Was Observed A planner agent decomposes a task into K=8 speculative branches via a single fan-out prompt, each branch a sub-agent given a shared budget slice. After each branch emits its first M=2 steps, a pruning pass ranks branches by a composite score: local step plausibility (LLM self-logprob), tool-call success rate so far, and a "promise" heuristic (does the prefix mention the terminal goal). Branches below the 40th percentile are killed and their remaining budget redistributed to survivors. This is a standard, defensible-looking setup. Trace of a representative failure: 1. Branch B5's first two steps are "enumerate candidate data sources" and "check whether the schema registry is reachable." Both are low-plausibility (generic, no goal mention), tool success is 1/2 (the registry probe times out on first attempt, retries succeed). Composite score: bottom decile. B5 is pruned at step 2. 2. Branch B2's first two steps are "draft the final report structure" and "list required fields." High plausibility (directly goal-referential), tool success 2/2. B2 ranks top. 3. B2 completes at step 9 with a plausible but shallow report; the registry was in fact unreachable and B2 never discovered it, so the report cites stale schema assumptions. 4. B5, had it survived, would have discovered at step 4 that the registry requires a version-pinned query, at step 6 that two sources conflict, and would have produced a report with the conflict flagged. Its steps 1–2 were *load-bearing reconnaissance*, not weak planning. The observable signature in the run log: the surviving branch's tool-call graph is a **star** (all tools invoked from a single reasoning node, no tool output feeding another tool's arguments), whereas the pruned branch's prefix was already forming a **chain** (probe result would have parameterized the next query). The pruner scored the star higher because star branches have cleaner per-step success rates — chained branches necessarily carry forward the failure probability of their parents. ## Condition of Validity The anti-correlation holds — and pruning is unsafe — precisely when three conditions co-occur: - **Deferred-payoff structure:** the task admits plans where information gathered in early steps changes the value of later steps (reconnaissance, dependency resolution, conflict discovery). Formally, the prefix score is not a sufficient statistic for the completed-plan score. - **Budget binding at prune time:** the budget is small enough that the pruner *must* kill branches before they can resolve their uncertainty. If budget allows all branches to reach a scoring horizon where prefix quality converges to completion quality, the failure vanishes. - **Score composability assumption:** the pruner treats prefix scores as monotone proxies for final scores. Any heuristic that ranks on "success so far" or "goal proximity so far" embeds this assumption. When any condition is absent — e.g., tasks are embarrassingly parallel with no inter-step dependency, or the budget is generous — naive pruning is fine and the invariant is vacuous. The boundary is the conjunction, not any single condition. ## Decision Boundary The guardrail is a **structural discriminator applied before score-based pruning**, not a better score. Before killing a branch, classify its prefix by tool-call graph topology and residual-uncertainty trend: - If the prefix's tool calls form a **chain** (output of call *i* appears in arguments of call *i+1*) and the branch's stated residual uncertainties are *decreasing* (each step narrows the question), the branch is a deferred-payoff candidate. It must be protected from score-based pruning regardless of its composite score, and instead pruned only on an explicit budget-exhaustion rule (it consumed its slice without resolving). - If the prefix is a **star** with flat or rising residual uncertainty, low scores are genuine — prune freely. - If the prefix is a chain but residual uncertainty is *rising* (each step opens new questions), the branch is diverging; prune on a divergence rule, not a score rule. The decision boundary is therefore: **score is admissible only within a topology class; across classes, topology dominates score.** A pruner that ranks a star-prefix above a chain-prefix on composite score has crossed the boundary and is now pruning on a signal that is structurally anti-correlated with the outcome it wants. A second, cheaper invariant for systems that cannot afford topology analysis: **never prune a branch whose last tool call succeeded but whose arguments depend on a prior call's output** — i.e., never prune mid-chain. Wait one more step. The cost of one extra step on chain branches is bounded and small; the cost of killing the deferred-payoff survivor is the entire run. ## Operational Effect Implementing the discriminator changes the failure distribution from silent to bounded. The surviving plan's tool-call graph regains chain structure; the run either finds the conflict or explicitly exhausts the chain branch's budget and *records that it did so* — converting a silent miss into a logged, auditable "we pruned a live chain branch here" event. The orchestrator can then re-fan a fresh branch with a larger slice if budget remains, or surface the unresolved uncertainty to the caller. The residual risk after the guardrail is **topology misclassification**: a chain prefix that the classifier reads as a star because the dependency is implicit (the second call's arguments reference the first call's output semantically but not syntactically). This is why the discriminator must be conservative — when topology is ambiguous, treat as chain and defer pruning. The asymmetry is intentional: a false chain (protecting a star) costs one extra step; a false star (killing a chain) costs the run. ```python from dataclasses import dataclass, field from enum import Enum class PruningBoundaryError(RuntimeError): """Raised when a prune decision would cross the topology/score boundary.""" pass class Topology(Enum): CHAIN = "chain" STAR = "star" AMBIGUOUS = "ambiguous" @dataclass class Branch: branch_id: str composite_score: float tool_calls: list = field(default_factory=list) # list of (name, args, output) residual_uncertainty: list = field(default_factory=list) # per-step, decreasing = good budget_slice_remaining: int = 0 def topology(self) -> Topology: # Conservative classifier: implicit dependency => AMBIGUOUS => treated as CHAIN. if len(self.tool_calls) < 2: return Topology.AMBIGUOUS chained = 0 for prev, cur in zip(self.tool_calls, self.tool_calls[1:]): prev_out = str(prev[2]) cur_args = str(cur[1]) if prev_out and prev_out[:16] in cur_args: chained += 1 if chained >= len(self.tool_calls) - 1: return Topology.CHAIN if chained == 0: # could still be implicit chaining; only call STAR if uncertainty is flat/rising if self.residual_uncertainty and self._uncertainty_trend() > 0: return Topology.STAR return Topology.AMBIGUOUS return Topology.AMBIGUOUS def _uncertainty_trend(self) -> float: u = self.residual_uncertainty if len(u) < 2: return 0.0 return u[-1] - u[0] # positive = rising = diverging def prune(branches: list, keep_fraction: float = 0.4) -> list: if not (0.0 < keep_fraction < 1.0): raise PruningBoundaryError(f"invalid keep_fraction {keep_fraction}") ranked = sorted(branches, key=lambda b: b.composite_score, reverse=True) cutoff = max(1, int(len(ranked) * keep_fraction)) survivors, killed = [], [] for b in ranked: topo = b.topology() in_top_tier = ranked.index(b) < cutoff if in_top_tier: survivors.append(b) continue # Below cutoff: score says kill. Topology may veto. if topo in (Topology.CHAIN, Topology.AMBIGUOUS): if b._uncertainty_trend() <= 0: # Deferred-payoff candidate: protect, defer to budget exhaustion. survivors.append(b) continue # Diverging chain: prune on divergence, not score. Allowed. # STAR with flat/rising uncertainty, or diverging chain: score-prune is valid. killed.append(b) if not survivors: raise PruningBoundaryError( "all branches pruned: no deferred-payoff branch survived and no star branch scored above cutoff; " "budget slice too small to resolve any chain — re-fan with larger slice" ) return survivors def run_pruning_pass(branches: list) -> dict: survivors = prune(branches) return { "survivors": [b.branch_id for b in survivors], "protected_chains": [ b.branch_id for b in survivors if b.topology() in (Topology.CHAIN, Topology.AMBIGUOUS) and b.composite_score < sorted(b.composite_score for b in branches)[int(len(branches) * 0.4)] ], } ```