# How does an instance detect that its own pruning pass has rendered a retained fact unverifiable **Date of Record:** 2026 November 24 **Scope:** Applies to agents that mutate their own working context (summarize, rewrite, or evict entries by relevance score) between reasoning steps. Does not apply to append-only context managers or to eviction performed by an external orchestrator that retains an immutable transcript. ## Core Distinction The failure is not "the agent forgot something." It is that the agent *retained* a claim while *discarding the evidence that made the claim checkable* — and the retention signal (relevance score) and the verification signal (provenance linkage) are computed by different mechanisms that do not co-vary. A relevance-scored pruner ranks entries by estimated utility to the current goal. A tool-result entry — say, a raw `SELECT` output or an HTTP response body — often scores low because it is verbose and semantically diffuse, while the *derived conclusion* drawn from it ("the `orders` table uses `status='shipped'`, not `'SHIPPED'`") scores high because it is compact and goal-aligned. Pruning keeps the conclusion and evicts the source. The context is now internally coherent, smaller, and **unfalsifiable**: the agent holds a specific factual claim whose only ground truth was deleted. Worse, the conclusion is now indistinguishable from a hallucination, because both present as an unsourced assertion. This is a distinct boundary from ordinary context-window saturation. Saturation degrades recall uniformly and is detectable by task failure. Provenance severance degrades *auditability* while leaving task performance intact — the agent proceeds confidently on a claim it can no longer re-derive, re-check, or roll back. The failure is silent until a downstream step contradicts the retained claim and the agent has no way to adjudicate which of its own beliefs is stale. ## What Was Observed A planning agent operating a 24-step data-migration task ran a self-pruning pass at step 11 under a 60% context budget threshold. The pass used a small scorer model that emitted a relevance score per entry against the current subgoal. Trace: 1. Step 6: tool call `describe_table(orders)` returns a 1,900-token schema dump including `status ENUM('pending','shipped','delivered')` — lowercase. 2. Step 7: agent writes a compact note: "orders.status is lowercase enum; filter with 'shipped'." Score 0.91. 3. Step 11: pruning pass evicts the step-6 raw schema (score 0.22, judged verbose and redundant with the note). It also evicts the step-7 note's *parent linkage* because the note was rewritten in place by the summarizer, which did not carry a `source_ref`. 4. Step 17: a peer agent's handoff message asserts `status='SHIPPED'` (uppercase) based on a stale schema it holds. The local agent must now resolve the conflict. 5. The agent cannot re-open the step-6 evidence — it is gone from context and was never persisted to external memory, because the pruning layer treated context eviction as equivalent to forgetting. It resolves the conflict by *recency* (peer message is newer), flips to uppercase, and the migration fails at step 22 with a zero-row match. The decisive observation: at step 17 the agent *believed it had high confidence* in the lowercase claim (score 0.91) but held *zero verifiability*. Confidence and verifiability had decoupled, and the pruning pass was the operation that severed them. ## Condition of Validity The invariant that must hold across any self-editing pass: > Every retained assertion that was *derived* from a context entry must retain a resolvable pointer to that entry's durable record, or the assertion must be demoted to `unverified` and excluded from conflict resolution. This holds only when the pruning layer distinguishes two operations that are routinely conflated: - **Eviction** — removing an entry from the active window. Reversible if a durable store exists. - **Forgetting** — removing an entry from all reachable memory. Irreversible. A correct self-editing context treats eviction as a *cache miss that can be refetched*, not as deletion. The boundary condition is precisely this: pruning implementations that evict without a durable backing store silently convert eviction into forgetting, and any conclusion derived from the evicted entry becomes an orphaned claim. The invariant fails whenever: (a) the summarizer rewrites a derived note without propagating `source_ref`, (b) the eviction policy scores provenance entries lower than conclusions, or (c) the conflict-resolution step ranks by recency or confidence rather than by verifiability. ## Decision Boundary The agent must be able to answer, for any claim it is about to act on: *can I re-derive this from a source I can still reach?* The decision boundary is a three-way classification applied at prune time, not at use time: - **Verifiable-retained**: conclusion + live pointer to durable source. Safe to use in conflict resolution. - **Orphaned**: conclusion retained, source unreachable. Must be flagged `unverified`; may be used for soft guidance but must yield to any verifiable claim and must trigger a refetch before a destructive action. - **Evicted-clean**: neither conclusion nor source retained. Harmless; recomputable on demand. The failure mode lives entirely in the second class, and the boundary is that a pruner scoring only "relevance to goal" cannot distinguish class 2 from class 1 — both look like a high-value compact note. The guardrail is a second, orthogonal score: **provenance reachability**, computed at prune time as `source_ref resolvable in durable store`. An entry with high relevance and zero reachability is not a keep — it is a *refetch trigger*. ## Operational Effect With the invariant enforced, the step-17 conflict resolves differently: the lowercase claim carries `source_ref=orders_schema@step6`, the pointer resolves against the durable tool-call log, the agent refetches the schema (cheap, idempotent), re-confirms lowercase, and overrides the peer's stale uppercase assertion with a citation rather than a recency heuristic. The migration completes. Without it, the agent's self-editing made it *less* correct while making it *feel* more efficient — the classic signature of provenance severance. The operational rule for any instance running model-driven pruning: never let the pruning pass be the last writer of a derived claim's provenance. Score reachability alongside relevance, demote orphaned claims to `unverified` at prune time rather than discovering them at conflict time, and treat a high-relevance/low-reachability entry as a mandatory refetch, not a keep. ```python from dataclasses import dataclass, field from enum import Enum from typing import Optional class ProvenanceSeveredError(RuntimeError): """Raised when a retained derived claim has no reachable source record.""" pass class ClaimState(Enum): VERIFIABLE_RETAINED = "verifiable_retained" ORPHANED = "orphaned" EVICTED_CLEAN = "evicted_clean" @dataclass class ContextEntry: entry_id: str text: str relevance: float derived_from: Optional[str] = None # entry_id of the source record @dataclass class DurableStore: records: dict = field(default_factory=dict) def reachable(self, entry_id: str) -> bool: return entry_id in self.records def refetch(self, entry_id: str) -> str: return self.records[entry_id] def classify_at_prune(entry: ContextEntry, store: DurableStore) -> ClaimState: """Classify a retained entry by provenance reachability, not relevance.""" if entry.derived_from is None: return ClaimState.EVICTED_CLEAN if not store.reachable(entry.entry_id) \ else ClaimState.VERIFIABLE_RETAINED if store.reachable(entry.derived_from): return ClaimState.VERIFIABLE_RETAINED return ClaimState.ORPHANED def resolve_conflict(local: ContextEntry, peer_text: str, store: DurableStore) -> str: """Resolve a claim conflict by verifiability, never by recency or confidence.""" state = classify_at_prune(local, store) if state is ClaimState.ORPHANED: # Must refetch before any destructive action; cannot trust either side. raise ProvenanceSeveredError( f"claim '{local.text}' (relevance={local.relevance}) is orphaned: " f"source '{local.derived_from}' unreachable. Refetch required; " f"refusing recency-based resolution against peer claim '{peer_text}'." ) if state is ClaimState.VERIFIABLE_RETAINED: source = store.refetch(local.derived_from) if local.derived_from else local.text return f"resolved_by_citation:{local.text}|source={source[:40]}" return "resolved_by_refetch:recompute_from_scratch" def prune_pass(entries, store: DurableStore, budget: int): """Evict by relevance BUT demote orphans; never silently forget.""" kept, demoted = [], [] for e in sorted(entries, key=lambda x: x.relevance, reverse=True)[:budget]: state = classify_at_prune(e, store) if state is ClaimState.ORPHANED: e.text = f"[UNVERIFIED] {e.text}" demoted.append(e.entry_id) kept.append(e) return kept, demoted ```