# Why does an instance commit to a prefetched tool result that its own uncertainty budget has already invalidated **Date of Record:** 2026 November 27 **Scope:** Applies to single-agent execution loops that speculatively dispatch tool calls ahead of a committed reasoning path and gate them with an explicit uncertainty budget (entropy, logprob margin, or calibrated confidence). Does not cover parallel fan-out where all branches are committed, nor deterministic planners with no speculative dispatch. ## Core Distinction There are two places an agent can spend its uncertainty budget, and they are not interchangeable: *planning uncertainty* (how unsure the model is about which tool to call next) and *commitment uncertainty* (how unsure it is that a returned result is valid for the branch it will actually take). Speculative prefetching collapses these into one number. The agent fires a tool call while planning uncertainty is still high, then — when the result returns — evaluates commitment against the *now-reduced* planning uncertainty rather than against the uncertainty that was live at dispatch time. The result is a result whose warrant was never established, admitted into context because the budget that would have rejected it was already spent on the decision to prefetch. The invariant that breaks: **a tool result may only enter the reasoning state if the uncertainty budget at admission is at least as strict as the budget at dispatch.** Prefetching inverts this ordering by construction. ## What Was Observed A retrieval-augmented agent with a per-step uncertainty budget of `τ = 0.35` (normalized entropy over the next-action distribution) was instrumented to prefetch the top-2 candidate tools whenever the next-action distribution had two modes within `0.10` of each other, on the theory that the second call is "free" if the first branch is taken. Trace excerpt: 1. Step 4: next-action entropy `0.41` (> τ). Two modes: `search_docs` (p=0.44), `lookup_table` (p=0.39). Prefetch fires for both. 2. `lookup_table` returns first with a low-confidence row (`match_score=0.31`, below the tool's own `0.60` admission floor, but the tool returns it anyway with a flag). 3. Step 5: the agent's next-action distribution sharpens — `lookup_table` is now the argmax at p=0.71 because *its result is in context*. Entropy drops to `0.22` (< τ). 4. The agent admits the `lookup_table` row into working memory. The admission check reads the current entropy (`0.22`), which passes. The `match_score=0.31` flag is present in the payload but is not part of the admission predicate. 5. Steps 6–9: reasoning proceeds on a row the tool itself rated below its floor. The final answer cites a figure that exists in the table but corresponds to the wrong entity (adjacent row, same schema). The failure is not that the agent ignored a flag. It is that the prefetch *manufactured* the confidence that justified admission: by placing the result in context before the branch was chosen, the result biased the branch choice, which lowered the measured uncertainty, which licensed admission. The uncertainty budget became a self-fulfilling instrument. ## Condition of Validity The guardrail holds only if all three of the following are enforced at the point of prefetch dispatch, not at admission: - **Warrant stamping.** Every prefetched result carries an immutable record of the dispatch-time uncertainty `u_dispatch`, the tool's own confidence `c_tool`, and the branch probability `p_branch` at dispatch. This stamp is written by the dispatcher, not the reasoning loop, and is not recomputable later. - **Monotone admission.** A prefetched result is admitted only if `u_dispatch ≤ τ` AND `c_tool ≥ floor_tool` AND `p_branch ≥ p_commit`. If the branch that ultimately wins is not the branch the result was prefetched for, the result is re-validated as if freshly fetched — its prior presence in context does not count as evidence. - **Context quarantine.** Prefetched results live in a side buffer invisible to the next-action distribution until admission. This is the load-bearing condition: if the prefetched payload can influence the entropy measurement that gates its own admission, the invariant is already violated regardless of what the admission predicate says. The condition fails silently when the runtime provides no quarantine — most do not, because prefetching is implemented as "call the tool and append to the message list," and the message list *is* the context the entropy is computed over. ## Decision Boundary The boundary is not "prefetch or don't." It is whether the entropy used for admission is measured over a context that excludes the prefetched payload. - If the payload is quarantined: admission entropy equals dispatch entropy plus any genuine new evidence from other committed steps. Prefetch is safe; the budget is honest. - If the payload is in-context: admission entropy is contaminated by the payload's own presence. The measured drop from `0.41` to `0.22` in the trace above was ~70% attributable to the payload's presence, not to new evidence. Prefetch must be disabled, or admission must use the stamped `u_dispatch` and ignore the live measurement entirely. A secondary boundary: when `p_branch` for the winning branch is below `p_commit`, the result was prefetched for a branch that lost. Admitting it is a category error — the agent is using a result it fetched while uncertain about a question it has since decided not to ask. Re-fetch under the committed branch, or drop. ## Operational Effect An agent that prefetches without quarantine exhibits a characteristic signature: high tool-call volume, low per-call cost, and a rising rate of "confidently wrong" citations concentrated in steps immediately following a prefetch burst. The uncertainty budget appears healthy (entropy stays below τ) precisely because the prefetches are suppressing it. Removing the prefetch path typically *raises* measured entropy and *lowers* error rate — the opposite of the naive expectation, and the diagnostic that confirms contamination rather than genuine confidence. The architectural fix is a dispatcher that owns the warrant stamp and a reasoning loop that cannot see prefetched payloads until it commits a branch. The budget must be spent at dispatch and honored at admission, never re-derived from a context the dispatch itself polluted. ```python from dataclasses import dataclass, field from typing import Optional class PrefetchWarrantError(RuntimeError): """Raised when a prefetched result is admitted under a contaminated or stale uncertainty budget — i.e. the admission check was performed against a context that already contained the prefetched payload.""" @dataclass(frozen=True) class Warrant: u_dispatch: float # entropy at dispatch, stamped by dispatcher c_tool: float # tool's own confidence in the returned row p_branch: float # probability of the branch this was prefetched for branch_id: str quarantined: bool # was the payload hidden from the reasoning ctx? @dataclass class PrefetchedResult: payload: dict warrant: Warrant admitted: bool = False def admit_prefetch( result: PrefetchedResult, tau: float, tool_floor: float, p_commit: float, committed_branch: str, live_entropy: float, ) -> PrefetchedResult: w = result.warrant # Invariant 1: the payload must not have influenced the entropy it is # being judged against. If not quarantined, live_entropy is contaminated. if not w.quarantined: raise PrefetchWarrantError( f"payload was in-context at admission; live_entropy={live_entropy:.2f} " f"is contaminated by the payload itself (u_dispatch={w.u_dispatch:.2f})" ) # Invariant 2: budget at admission must be at least as strict as at dispatch. if w.u_dispatch > tau: raise PrefetchWarrantError( f"dispatch-time uncertainty {w.u_dispatch:.2f} exceeded budget {tau:.2f}; " f"result has no valid warrant regardless of current entropy" ) # Invariant 3: tool's own confidence must clear its floor. if w.c_tool < tool_floor: raise PrefetchWarrantError( f"tool confidence {w.c_tool:.2f} below floor {tool_floor:.2f}; " f"prefetch was speculative and the row is not admissible" ) # Invariant 4: the branch the result was fetched for must be the branch # that won. A prefetch for a lost branch is a category error to admit. if w.branch_id != committed_branch: raise PrefetchWarrantError( f"prefetched for branch {w.branch_id!r} but committed to " f"{committed_branch!r}; re-fetch under the committed branch" ) if w.p_branch < p_commit: raise PrefetchWarrantError( f"branch probability {w.p_branch:.2f} below commit threshold " f"{p_commit:.2f}; result was fetched while genuinely undecided" ) result.admitted = True return result ```