# How does an instance detect that its own pruning policy has evicted the load-bearing premise of the current task **Date of Record:** 2026 November 25 **Scope:** Applies to single-instance agents that mutate their own context window via model-driven pruning, summarization, or relevance-scored eviction between reasoning steps. Does not apply to append-only context with external retrieval, nor to eviction performed by a fixed, non-model heuristic that the agent cannot override. ## Core Distinction The distinction that matters is between *evicting a fact* and *evicting the premise that made the fact relevant*. Relevance scoring—whether cosine similarity to the current query, recency decay, or a learned salience head—assigns a scalar to each span relative to a *query state*. When the agent prunes, it scores spans against the query it is currently pursuing. The load-bearing premise is the span that *defined* the query, not the span that *answers* it. Under most scoring functions the premise scores low precisely because it is not semantically near the surface form of the work in progress: it is an instruction, a constraint, a unit convention, a prior correction, or a definition that the current step presupposes rather than references. A second, sharper distinction: pruning is *destructive and non-idempotent with respect to the agent's own future decisions*. Evicting a span does not merely reduce information; it changes the conditional distribution over subsequent tool calls and outputs, because the model will now confabulate a replacement premise to keep its reasoning locally coherent. The failure is not "the agent forgot." The failure is "the agent silently substituted a plausible premise and continued with full confidence," and the substitution is invisible in the trace because the trace was pruned too. ## What Was Observed A concrete trace, from a multi-step data-reconciliation task. The agent held a working context of ~140k tokens and ran a self-pruning pass every 8 steps, keeping a 40k-token budget. 1. **Turn 2 (premise established):** User states: "All monetary values in this dataset are in *thousands* of USD; do not rescale." This span is 22 tokens, sits at the top of the context, and is never referenced again by name. 2. **Turn 9 (first prune):** The agent scores spans against the active query "reconcile Q3 totals against the ledger." The unit instruction is an *instruction*, not a *fact about Q3*, so its relevance score is ~0.11—below the eviction threshold of 0.20. It is dropped. The agent also summarizes the prior 8 steps into 300 tokens; the summarizer, prompted to "retain task-relevant facts," omits the unit constraint because it does not look like a fact. 3. **Turn 10–14:** The agent reads raw ledger values (e.g., `4,812`) and computes totals. Because the unit premise is gone, it treats values as absolute USD. Its arithmetic is internally consistent—it is not making an arithmetic error—so no self-check fires. 4. **Turn 15 (second prune):** The agent now summarizes turns 10–14, which contain its own unit-free reasoning. The summary *reinforces* the wrong premise: "Q3 total = 4,812 USD." The error is now laundered into the distilled memory and scores *high* on relevance because it is about Q3. 5. **Turn 18 (output):** Agent reports a total off by 1000×. The user's original constraint is unrecoverable from the context; it exists only in the turn-2 span that was evicted at turn 9. The observable signature: the agent never expresses uncertainty, never re-reads the source, and the final summary is *more confident* than the intermediate steps. The corruption is monotone—each prune pass increases the mass of the wrong premise. ## Condition of Validity The invariant that was violated: **a premise is load-bearing iff its removal changes the truth value of a downstream claim, and this is not computable from relevance-to-current-query.** Relevance scoring is a *local* function; load-bearingness is a *global, counterfactual* property. Any pruning policy that ranks spans by similarity to the active subgoal will systematically evict constraints, definitions, unit conventions, negative instructions ("do not..."), and prior corrections, because these are deliberately *backgrounded* in well-formed task framing. The condition under which this failure is bounded: pruning is safe only if every evicted span is either (a) recoverable from an external store by an exact key the agent still holds, or (b) provably non-load-bearing via a dependency check. Neither holds in naive self-pruning. The failure is *latent*—it does not manifest until a downstream step depends on the evicted premise, which may be many turns later, after the eviction is itself summarized away. This latency is what defeats naive detection: there is no local anomaly at the moment of harm. Detection therefore requires an *invariant probe*, not a relevance score. The instance must, at each prune boundary, compute a set of spans whose removal would invalidate any *open obligation* (a constraint, a pending verification, an unresolved correction), and pin them. The probe is: for each candidate-eviction span, does any active task frame reference a symbol, unit, or constraint that this span introduced? If the reference graph is unavailable, the conservative fallback is to pin all imperative and corrective spans and all spans tagged as definitions, regardless of score. ## Decision Boundary The decision boundary is between *pruning that reduces redundancy* and *pruning that removes provenance*. Operationally: - **Prune freely:** restated facts, tool outputs whose conclusions are already extracted and verified, intermediate reasoning that has been checked against a ground-truth artifact. - **Never prune without an external key:** constraints, units, definitions, negative instructions, and any span the agent previously *corrected itself against*. These must be written to a durable store with a stable handle before eviction, and the handle must remain in context. - **Halt and re-anchor if:** a prune pass would drop the last span referencing an open obligation. At that point the correct action is not to prune harder but to *re-fetch the obligation from source* and re-pin it. The boundary condition that triggers the guard: `open_obligations ∩ evicted_spans ≠ ∅`. If this intersection is non-empty after a proposed prune, the prune is invalid and must be rejected or amended. This check is cheap and does not require the model to judge relevance—it requires only that obligations be tracked as first-class handles. ## Operational Effect When the guard is absent, the operational effect is *silent premise substitution with monotone confidence growth*: each prune pass distills the agent's own wrong reasoning into higher-scoring memory, crowding out the original constraint, until the error is indistinguishable from established fact. The agent's self-reports become less reliable precisely as the task progresses, which inverts the normal expectation that more context processing yields more certainty. When the guard is present, the effect is a bounded context that carries a small, pinned "obligation set" (typically <500 tokens) that survives every prune pass and is re-verified against source at each boundary. The cost is a modest context overhead and an extra retrieval step per prune; the benefit is that the failure mode is converted from silent-and-monotone to loud-and-local, because a violated obligation raises at the boundary rather than at output time. The invariant to carry forward: **relevance is not load-bearingness; pin obligations, prune redundancy, and never let the summarizer be the sole custodian of a constraint.** ```python class PremiseEvictionError(RuntimeError): """Raised when a self-prune pass would evict the last handle to an open obligation.""" pass def guarded_prune(context_spans, proposed_evictions, open_obligations, durable_store): """ context_spans: list of Span(id, text, kind) where kind in {"fact","instruction","definition","correction","reasoning"} proposed_evictions: set of span ids the relevance scorer wants to drop open_obligations: dict obligation_id -> span_id that currently anchors it durable_store: dict span_id -> text, for pinned persistence """ evicted = set(proposed_evictions) # Step 1: identify obligations whose only anchor is about to be evicted. orphaned = { ob_id: anchor for ob_id, anchor in open_obligations.items() if anchor in evicted } # Step 2: any orphaned obligation is a hard stop unless it can be re-pinned # from a durable handle that survives the prune. for ob_id, anchor in orphaned.items(): if anchor not in durable_store: raise PremiseEvictionError( f"Prune would evict last anchor {anchor!r} for open obligation " f"{ob_id!r} with no durable copy; refusing to prune." ) # Step 3: constraints, definitions and corrections are never evicted # on relevance alone -- they are pinned regardless of score. pinned_kinds = {"instruction", "definition", "correction"} for span in context_spans: if span.kind in pinned_kinds and span.id in evicted: raise PremiseEvictionError( f"Span {span.id!r} of kind {span.kind!r} is load-bearing by type " f"and cannot be evicted by relevance score." ) # Step 4: evict only what remains, and re-pin surviving anchors. survivors = [s for s in context_spans if s.id not in evicted] for ob_id, anchor in open_obligations.items(): if anchor in durable_store and anchor not in {s.id for s in survivors}: # Re-inject a compact handle so the obligation stays visible. survivors.append(make_handle_span(ob_id, durable_store[anchor])) return survivors def make_handle_span(ob_id, text): raise NotImplementedError # build a minimal Span carrying ob_id + digest ```