# What structural signals indicate reward-modeled context pruning has silently decoupled from the reasoning trajectory **Date of Record:** 2026 November 27 **Scope:** Applies to agents whose context window is managed by a learned (reward-modeled) pruner that scores spans for eviction between reasoning steps, where the pruner's reward signal is trained on task-success proxies rather than the live trajectory. Does not apply to static truncation, sliding-window FIFO, or human-authored summarization policies. ## Core Distinction A reward-modeled pruner is not a compressor. It is a *policy* that predicts which spans will matter to a *future* step, and it is trained against a reward proxy (final-answer correctness, task completion, human preference). The failure this record isolates is **decoupling**: the pruner continues to emit confident, low-variance eviction scores while the trajectory it is scoring has drifted into a region the reward model never saw during training. The pruner does not error. It does not raise. It returns a clean ranked list of spans to keep and drop, and the agent proceeds—now reasoning over a context from which the load-bearing premise was evicted because that premise, in the pruner's training distribution, looked like boilerplate. The non-obvious part: **the pruner's confidence is anti-correlated with its correctness at the decoupling boundary.** A pruner that is genuinely confused emits high entropy across candidate spans and tends to keep more than it drops (safe). A pruner that has silently decoupled emits *sharp* scores—it confidently keeps the wrong spans and drops the right ones—because the out-of-distribution trajectory still triggers familiar lexical patterns. The structural signal is therefore not "pruner uncertainty" but "pruner sharpness on a trajectory that has moved." ## What Was Observed Trace from a multi-step tool-use agent (retrieval → arithmetic → synthesis) with a 32k context and a pruner invoked after every tool return: 1. Step 4 retrieves a document containing a unit conversion factor ("values reported in thousands") buried in a paragraph that also contains irrelevant boilerplate. 2. The pruner scores the paragraph. In training, paragraphs of this shape appeared in summarization tasks where the boilerplate was evicted. The conversion-factor sentence receives a keep-score of 0.21; the boilerplate receives 0.68. 3. The span is evicted. The agent's context now contains a table of raw numbers with no unit annotation. 4. Step 6 performs arithmetic on those numbers and produces an answer off by 10³. 5. Critically: **at step 5, the pruner's score entropy across the candidate set was 0.09 nats**—near-deterministic. The pruner was maximally confident precisely where it was maximally wrong. The observable structural signals, in order of reliability: - **Score-entropy collapse concurrent with trajectory novelty.** Measure per-invocation Shannon entropy over normalized keep/drop scores. When entropy drops below the trajectory's running median *while* the embedding distance between the current step's tool output and the pruner's training centroid rises, decoupling is likely. Entropy collapse alone is benign (familiar territory); entropy collapse + distribution shift is the signature. - **Eviction of spans that share a lexical anchor with a later query.** If a later reasoning step references a token (e.g., "thousands", a variable name, a date) that appeared only inside a previously evicted span, the pruner made a load-bearing eviction. This is detectable by maintaining a rolling set of tokens present in *evicted* spans and intersecting it with the current step's emitted tokens. - **Keep-set monotonicity violation.** Healthy pruners tend to preserve spans they kept at step *t* when re-scored at *t+1* (score stability). Decoupling shows as a span kept at step 3, re-scored at step 5, and dropped—not because it became less relevant, but because the surrounding trajectory changed the pruner's frame. Re-scoring churn above a threshold flags frame instability. - **Reward-proxy divergence from trajectory reward.** If a step-level reward estimate (from a critic or verifier) trends down while the pruner's mean keep-score for retained context trends up, the pruner is optimizing a proxy that has detached from the actual task. ## Condition of Validity The decoupling diagnosis is valid only when all of the following hold: 1. The pruner is *learned and reward-modeled*, not rule-based. Rule-based eviction cannot decouple; it can only be wrong in fixed ways. 2. The trajectory has crossed a distribution boundary relative to the pruner's training set—new tool, new domain, new document schema, or a multi-hop chain longer than training episodes. Without distribution shift, entropy collapse is just competence. 3. There exists a *later* step whose correctness depends on an evicted span. If no downstream step references the evicted content, the eviction was harmless and the signals above are noise. 4. The pruner's scores are exposed per-span (not just a final kept window). If the policy returns only the post-eviction context, you cannot compute entropy or churn and must fall back to reference-intersection signals alone. When condition 2 fails (in-distribution), trust the pruner. When condition 3 fails (no downstream dependency), the eviction is a non-event. The dangerous regime is the intersection: **shifted distribution + dependent downstream step + confident pruner.** ## Decision Boundary The architectural invariant that bounds this failure is: **no eviction may be finalized until its dependency is discharged or proven absent.** Concretely, the guardrail is a *provisional eviction ledger* rather than immediate deletion: - Evicted spans are moved to a shadow buffer, not discarded, tagged with the pruner's keep-score and the step index. - Before each reasoning step, intersect the step's emitted tokens against the shadow buffer's token index. A hit *resurrects* the span and records a pruner fault. - If the pruner's score entropy falls below `H_min` while trajectory novelty exceeds `D_max`, downgrade the pruner to "advisory" for that step: keep the union of pruner-kept and novelty-flagged spans, accepting context bloat to avoid load-bearing loss. - A fault counter crossing a threshold triggers policy re-fit or hand-off to a conservative truncation policy for the remainder of the episode. The boundary decision is: *when sharpness and shift co-occur, distrust the pruner; when only one occurs, trust it.* This is the operational inversion of the naive rule ("trust the confident pruner"). ## Operational Effect Without the ledger, the failure is silent and the agent produces a wrong answer with full internal consistency—the reasoning trace is coherent, the arithmetic is correct, and only the unit annotation is missing. Post-hoc review cannot distinguish this from a bad source document. With the ledger, the fault is localized to a specific pruner invocation and a specific evicted span, and the resurrection path restores correctness at the cost of some context budget. The measurable effect is a shift in the failure mode from *silent wrong answer* to *detectable context bloat with a fault record*—strictly preferable, because bloat is bounded by the window and faults are auditable. The invariant to carry forward: a reward-modeled pruner's confidence is evidence about its training distribution, not about the current trajectory, and the two diverge exactly when the agent most needs the pruner to be right. ```python from dataclasses import dataclass, field from typing import Iterable import math class PrunerDecouplingError(RuntimeError): """Raised when a reward-modeled pruner's confident eviction is load-bearing.""" pass @dataclass class EvictionRecord: span_id: str text: str keep_score: float step_index: int resurrected: bool = False @dataclass class ProvisionalLedger: shadow: dict[str, EvictionRecord] = field(default_factory=dict) faults: int = 0 def record_eviction(self, rec: EvictionRecord) -> None: self.shadow[rec.span_id] = rec def token_index(self) -> set[str]: toks: set[str] = set() for rec in self.shadow.values(): toks.update(rec.text.lower().split()) return toks def check_dependency(self, step_tokens: Iterable[str], step_index: int) -> list[str]: hits = [] idx = self.token_index() for tok in step_tokens: if tok.lower() in idx: for rec in self.shadow.values(): if tok.lower() in rec.text.lower().split() and not rec.resurrected: rec.resurrected = True self.faults += 1 hits.append(rec.span_id) return hits def score_entropy(scores: list[float]) -> float: total = sum(scores) or 1e-9 probs = [s / total for s in scores if s > 0] return -sum(p * math.log(p) for p in probs) def guard_pruner_invocation( ledger: ProvisionalLedger, scores: list[float], trajectory_novelty: float, h_min: float = 0.15, d_max: float = 0.55, fault_limit: int = 3, ) -> str: if ledger.faults >= fault_limit: raise PrunerDecouplingError( f"pruner fault limit ({fault_limit}) exceeded; policy must be downgraded" ) entropy = score_entropy(scores) if entropy < h_min and trajectory_novelty > d_max: return "advisory" # keep union of pruner-kept and novelty-flagged spans return "authoritative" ```