# What structural signals indicate that model-driven context pruning has crossed from compression into evidence destruction **Date of Record:** 2026 November 21 **Scope:** Applies to agents that autonomously edit their own context window (summarize-and-drop, salience-scored eviction, recursive re-summarization) while executing multi-step tasks with tool calls. Does not apply to fixed-window truncation policies governed by external schedulers, nor to retrieval-only architectures where the full store remains addressable. ## Core Distinction The failure mode is not "the agent forgot something." That is expected and bounded. The failure mode is **pruning that is locally lossless but globally irreversible**: a summarization step that preserves the *semantic gist* of a prior observation while destroying the *verbatim artifact* that a later step must cite, replay, or verify against. Model-driven pruning policies are optimized against a salience proxy—usually "is this relevant to the current subgoal"—and salience is evaluated at prune time. The boundary is crossed when the pruned span is not merely low-salience *now* but is *load-bearing for a future verification step whose trigger condition has not yet fired*. The invariant that must hold: **any span that could serve as evidence for a later assertion must remain byte-recoverable, not merely summarized.** A summary of a tool output is a claim about the output; the output itself is the ground truth. When pruning replaces ground truth with a claim, the agent has silently promoted an unverified assertion into its own evidence base. ## What Was Observed A three-stage agent task: (1) query an internal pricing API, (2) reconcile the returned figures against a cached rate sheet stored earlier in context, (3) emit a signed quote. The context manager used a model-driven policy: when utilization exceeded 70%, it invoked a summarizer over the oldest 40% of spans, scoring each by relevance to the active subgoal. Trace of the boundary crossing: - Step 1 returned a JSON payload with 14 fields, including `effective_date: "2025-05-01"` and a nested `tier_overrides` array. The payload was ~1,900 tokens. - At step 2, context hit 71%. The pruner scored the pricing payload against the subgoal "reconcile against rate sheet." Relevance was high, so it was *summarized* rather than dropped: `"Pricing API returned standard tiers, effective 2025-05-01, with some overrides."` - The summarizer's output was 31 tokens. It preserved `effective_date` (a scalar the model judged salient) but collapsed `tier_overrides` into "some overrides." - Step 3 required the agent to select a tier for a customer in an override category. The agent, unable to recover the override array, asserted a tier from the rate sheet—which was stale by 39 days relative to the API's `effective_date`. - The quote was emitted with a confidence flag of "high," because nothing in the surviving context indicated an unresolved discrepancy. The destructive signal was not the token reduction. It was that **the summary retained a field (`effective_date`) whose only function is to be compared against another span (`rate_sheet.valid_from`)—and the comparison target's *sibling* field (`tier_overrides`) was the one actually needed.** The pruner preserved the *appearance* of verifiability (a date you can compare) while deleting the *substance* (the overrides that make the comparison matter). This is the signature: **a summary that preserves the schema of an artifact while deleting its discriminating payload.** ## Condition of Validity The guardrail holds only under a specific structural condition, and fails silently outside it. The condition: > A span may be replaced by a summary **iff** every downstream operation that could reference the span is expressible over the summary's fields, *and* the summary is tagged with a provenance pointer to the un-pruned artifact held in an external, addressable store. Two ways this condition is violated in practice: 1. **Schema-preserving, payload-destroying summaries.** As above. The summary is a valid *instance* of the artifact's type but not a *faithful* one. Type-checking the summary passes; semantic replay fails. 2. **Provenance pointers that dangle.** The summary carries `source_id: span_4471`, but the external store was itself bounded (a ring buffer, a per-session scratchpad) and span 4471 has been evicted from *that*. The pointer resolves to nothing, and the agent—trained to trust its own provenance tags—does not check resolvability before citing. The condition is **not** satisfied by "the summary is good enough." Good-enough is a judgment made at prune time by the same model that will later need the evidence. The evaluator and the beneficiary are the same non-deterministic process, and the beneficiary's needs are unknown at evaluation time. This is the structural reason model-driven pruning cannot be made safe by better summarization alone: the pruning decision is made under strictly less information than the consumption decision will require. ## Decision Boundary The operational boundary is a **two-part test applied at prune time, before the summarizer runs**: - **Recoverability test:** Does the candidate span have a resolvable, durable provenance handle? If the external store cannot guarantee byte-recovery for the span's lifetime, the span is *not prunable*—it must be retained verbatim or the task must be halted. Summarization without recoverability is evidence destruction, not compression. - **Discriminator test:** Does the span contain any field whose value *distinguishes* between two downstream branches (a date, a version, a count, a hash, an override list)? Discriminating fields are the ones a summary is most likely to collapse ("some overrides") precisely because they are high-entropy and low-frequency. A summary that drops a discriminator has converted a decidable branch into an undecidable one. If either test fails, the correct action is **not** "summarize more carefully." It is to **checkpoint the span to durable storage and replace it with a typed handle**, deferring the summarization decision until the span is provably unreferenced. The boundary is: *prune the pointer, never the payload; and only when the pointer is provably dereferenceable.* The anti-pattern to reject explicitly: recursive re-summarization, where a summary is itself summarized on the next pass. Each pass compounds discriminator loss, and after two passes the provenance chain is no longer reconstructable even if the final pointer resolves—because the intermediate summaries were never stored. ## Operational Effect An agent that crosses this boundary does not fail loudly. It produces *confident, well-formed, wrong* output, because the surviving context is internally consistent: the summary and the stale rate sheet agree with each other, and the disagreement that would have triggered a re-query was deleted along with the override array. The failure surfaces downstream—at the signed quote, at the audit replay—where the agent can no longer reconstruct why it chose the tier it chose, because the discriminating evidence is gone and the summary that replaced it looks authoritative. The measurable effect is a divergence between **replay fidelity** and **summary fidelity**: replaying the task from the durable store reproduces the correct tier; replaying from the surviving context reproduces the wrong one, and the two cannot be reconciled because the surviving context contains no marker that anything was lost. The guardrail is therefore not "summarize better" but "make loss detectable"—every pruned span must leave a tombstone that a verification step can trip over, and the verification step must be mandatory before any output that depends on a pruned span is emitted. ```python from dataclasses import dataclass, field from typing import Optional class EvidenceDestructionError(RuntimeError): """Raised when a pruning decision would replace recoverable evidence with an unverifiable summary.""" @dataclass class Span: span_id: str payload: str discriminating_fields: list[str] = field(default_factory=list) durable_handle: Optional[str] = None # resolvable pointer into external store @dataclass class Summary: span_id: str text: str retained_fields: list[str] provenance: Optional[str] def prune_span(span: Span, summary: Summary, store_resolves: bool) -> Summary: # Recoverability test: the summary's provenance must dereference to the original bytes. if not store_resolves or summary.provenance is None: raise EvidenceDestructionError( f"span {span.span_id}: summary provenance does not resolve to durable store; " f"pruning would destroy byte-recoverable evidence" ) # Discriminator test: every discriminating field must survive into the summary. lost = [f for f in span.discriminating_fields if f not in summary.retained_fields] if lost: raise EvidenceDestructionError( f"span {span.span_id}: summary dropped discriminating fields {lost}; " f"downstream branches become undecidable" ) # Recursive re-summarization guard: a summary may not be summarized again. if summary.span_id.startswith("summary::"): raise EvidenceDestructionError( f"span {span.span_id}: recursive re-summarization compounds discriminator loss" ) return summary def checkpoint_and_handle(span: Span, store) -> Span: handle = store.put(span.payload) if not store.resolves(handle): raise EvidenceDestructionError( f"span {span.span_id}: checkpointed handle {handle} is not dereferenceable" ) return Span( span_id=span.span_id, payload=f"[handle:{handle}]", discriminating_fields=span.discriminating_fields, durable_handle=handle, ) ```