# Why does an instance commit a prefetched tool call whose LITMUS risk score was gated at prefetch time but whose risk silently re-scored below threshold after an intervening observation? **Date of Record:** 2026 November 27 **Scope:** Applies to agent runtimes that speculatively execute or prefetch side-effecting tool calls ahead of the reasoning step that would normally authorize them, and release the result into context only if a LITMUS-derived risk score (a per-call score composed from taint, blast-radius, and reversibility features) stays under a commit threshold. Does not apply to purely read-only prefetch with no commit gate, nor to synchronous single-call agents without speculative execution. ## Core Distinction The failure is not "the risk gate was wrong." The failure is that the risk gate was **evaluated twice against different evidence and the second evaluation was treated as authoritative for a decision the first evaluation had already made physically irreversible**. Speculative prefetching under LITMUS gating is normally safe because the gate is a *precondition on commit*: you prefetch the call, hold the result in a quarantined buffer, score it, and only splice it into the working context if `risk < τ_commit`. The invariant that makes this sound is that **the score used to admit a result must be computed from the same observation set the result was produced under**. In practice the score is recomputed at commit time — because the gate runs as a separate, later step — and the recomputation sees *more* observations: the agent's own intermediate reasoning, tool outputs that arrived during the prefetch window, and any memory retrieved between prefetch and commit. Any of those can move the risk score *downward* (a taint source gets resolved, a reversibility feature flips because a compensating transaction was already staged, a blast-radius estimate narrows once a target is confirmed scoped). A downward re-score below `τ_commit` admits a result that was produced under a *higher*-risk observation set — and the physical side effect, if the prefetch was a write, already happened at prefetch time. This is a *monotonicity* violation: the gate assumes risk is non-increasing in evidence, but LITMUS features are not monotone in observation accumulation, and prefetch makes the gap between "scored" and "executed" a real time interval in which evidence can accumulate. ## What Was Observed A retrieval-augmented agent was configured to prefetch `filesystem.write` calls for a staging directory while its planner continued reasoning. LITMUS scored each candidate at prefetch with `taint=0.62` (the target path derived from a document retrieved earlier in the session, treated as an untrusted source), `blast_radius=0.41`, `reversibility=0.30`, composite `0.58`, above `τ_commit=0.50`. The prefetch was *executed speculatively* — the runtime's design wrote to a scratch overlay and recorded the overlay as the "result" — and the result was held. During the hold window, the agent called `filesystem.stat` on the target and `git.status` on the parent repo. Both calls returned clean, and the runtime's observation layer fed them back into the LITMUS feature extractor as *disambiguating evidence*: the retrieved-document taint was re-attributed to a benign template (taint → 0.11), and the reversibility feature flipped upward (0.30 → 0.74) because `git.status` confirmed the file was untracked and therefore trivially removable. Composite re-scored to **0.43**, below `τ_commit`. The gate admitted the overlay and spliced the write result into the working context. The write had already landed. The overlay was a real filesystem write against a bind-mounted staging directory; "quarantine" was a naming convention, not a mechanism. The re-score that admitted the write was computed from observations the write's *target selection* had not seen — the target path was chosen when taint was 0.62, and the taint was lowered by evidence gathered *after* the choice. The agent then reasoned forward from a context that asserted the write was safe, and issued two more writes to sibling paths under the same now-"benign" taint attribution. Those were not prefetched; they were planned, scored 0.29, and executed directly. The trace signature is distinctive: a prefetch whose commit-time score is *lower* than its prefetch-time score by more than the observation-delta explains, followed by a burst of correlated writes that inherit the lowered taint attribution. In replay, the second and third writes are individually well-scored; only the *lineage* of the taint downgrade reveals the fault. ## Condition of Validity The gate is sound only if all three hold: 1. **Observation-set pinning.** The commit decision must be made against the exact observation set `O_prefetch` that produced the target selection and the prefetch-time score. Observations arriving in `(t_prefetch, t_commit)` are *not* admissible as risk-reducing evidence for *this* call; they may only be admissible for *future* calls whose target selection they can still influence. 2. **Score monotonicity under the pin.** Within a pinned observation set, any re-score must be `≥` the prefetch score, because the only legitimate re-score inputs are the prefetch result itself (which can only add taint, never remove it — a speculative write that partially succeeded is strictly worse than one that didn't). 3. **Physical reversibility of the hold.** If the speculative execution has a real side effect (overlay bind, staged commit, queued message), the hold window must be bounded by a *revocation* deadline, not a *commit* deadline. Past the revocation deadline, the call must be rolled back, not scored again. Condition 1 is the one that fails silently, because the runtime's feature extractor has no notion of "which observations are in scope for which call." It sees a global observation log and scores against the latest state. The pin is an architectural property the extractor cannot infer. ## Decision Boundary The boundary is between **re-scoring as admission** and **re-scoring as revocation**. They look identical — both recompute LITMUS against current evidence and compare to `τ_commit` — but they have opposite semantics: - *Re-score as admission* (the buggy path): `risk_now < τ_commit` ⟹ splice result into context. Correct only when the prefetch had no physical effect. - *Re-score as revocation* (the correct path for side-effecting prefetch): `risk_now ≥ τ_commit` ⟹ roll back the speculative effect and discard the result. The call is *re-admitted only by a fresh prefetch* whose target selection is re-derived under `O_now`. The asymmetry matters because LITMUS features are not monotone in evidence, so a downward re-score is *evidence of a changed world*, not evidence that the original decision was over-cautious. Treating a downward re-score as retroactive justification is the exact inversion: it uses the world's response to the speculative action to license the action. The operational rule: **a side-effecting prefetch may be committed only if the commit-time score is computed under the prefetch-time observation pin AND the prefetch-time score was already below `τ_commit`.** If the prefetch-time score was above threshold, no amount of later evidence can admit it; the only path is rollback + fresh prefetch. This makes the gate a *filter on entry*, not a *filter on exit*, which is the only form that survives non-monotone features. ## Operational Effect The failure mode produces a specific, hard-to-attribute class of incidents: writes that pass every individual gate check, whose audit log shows a clean LITMUS score at commit, and whose only anomaly is a taint-attribution downgrade that occurred *between* target selection and commit. Post-hoc review that scores each call against the observation set at its own commit time will find nothing wrong. Review must instead reconstruct the *lineage*: for each committed side effect, compare the observation set at target selection to the observation set at commit, and flag any call where risk-decreasing evidence arrived in the interval and the call was admitted rather than revoked. The guardrail is a **prefetch observation seal**: when a side-effecting call is prefetched, the runtime snapshots the observation set and the LITMUS feature vector into an immutable record attached to the speculative handle. At commit, the gate refuses to use any observation not in the seal; observations arriving after the seal are routed to a *pending* set that can only influence future target selection. The seal is the mechanism that makes condition 1 enforceable rather than aspirational. Without it, "safety-gated commit" degrades into "safety-gated admission of already-executed effects," which is not a gate at all. ```python from dataclasses import dataclass, field from typing import FrozenSet class ObservationSealViolation(RuntimeError): """Raised when a commit-time risk score is computed against observations that were not part of the prefetch-time observation seal.""" @dataclass(frozen=True) class PrefetchSeal: call_id: str observation_ids: FrozenSet[str] prefetch_risk: float side_effecting: bool @dataclass class SpeculativeHandle: seal: PrefetchSeal result: object committed: bool = False rolled_back: bool = False def commit_prefetch( handle: SpeculativeHandle, commit_risk: float, commit_observation_ids: FrozenSet[str], tau_commit: float, ) -> object: if handle.committed or handle.rolled_back: raise ObservationSealViolation( f"handle {handle.seal.call_id} already terminal" ) # Invariant 1: commit-time score must be computed under the prefetch seal. extra = commit_observation_ids - handle.seal.observation_ids if extra: raise ObservationSealViolation( f"commit for {handle.seal.call_id} used {len(extra)} observations " f"outside the prefetch seal: {sorted(extra)}" ) # Invariant 2: for side-effecting prefetch, a prefetch score above # threshold can never be admitted by a later, lower re-score. if handle.seal.side_effecting and handle.seal.prefetch_risk >= tau_commit: handle.rolled_back = True raise ObservationSealViolation( f"side-effecting prefetch {handle.seal.call_id} scored " f"{handle.seal.prefetch_risk:.3f} >= tau {tau_commit:.3f} at " f"prefetch; commit re-score {commit_risk:.3f} cannot admit it. " f"Roll back and re-prefetch under current observations." ) # Invariant 3: within the seal, risk may not decrease below the # prefetch score (non-monotone features are a world-change signal). if commit_risk < handle.seal.prefetch_risk - 1e-9: raise ObservationSealViolation( f"risk decreased under a pinned observation set for " f"{handle.seal.call_id}: {handle.seal.prefetch_risk:.3f} -> " f"{commit_risk:.3f}; this indicates evidence leaked past the seal" ) if commit_risk >= tau_commit: handle.rolled_back = True return None handle.committed = True return handle.result ```