# Why does an instance lose the provenance edge of a compacted fact before it loses the fact itself? **Date of Record:** 2026 December 1 **Scope:** Applies to any agent that performs mid-task context compaction (summarization, hierarchical rollup, or eviction-with-distillation) and subsequently acts on the compacted state. Does not apply to stateless single-shot inference or to systems that never rewrite their own context. ## Core Distinction Most compaction-fidelity work measures whether a fact survives: does the summary still contain "the user's account ID is 4471"? That is the wrong axis of loss. The failure that actually corrupts downstream behavior is **provenance decay**: a fact survives compaction as a *content-identical string* while the metadata that determined how much authority to grant it is silently dropped. The distinction is between *semantic retention* (the proposition survives) and *epistemic retention* (the warrant for believing the proposition survives with it). Compaction pipelines are almost universally optimized for the former and structurally blind to the latter. The concrete non-obvious boundary: a fact sourced from an untrusted tool output, a superseded observation, or a speculative hypothesis gets compacted into the same undifferentiated prose register as a fact that was directly verified by the agent. After compaction, the two are lexically indistinguishable. The instance does not lose the fact — it loses the *reason it was allowed to trust the fact*, and then treats a poisoned or stale claim with the authority of a verified one. ## What Was Observed A long-horizon task (roughly 40k tokens of tool-call history) hit a context budget trigger at 78% saturation and invoked a summarization compaction pass. The pre-compaction transcript contained, in order: 1. A tool call `read_config` returning `{"retry_limit": 5, "source": "prod"}` — directly observed, high warrant. 2. A later tool call `read_config` returning `{"retry_limit": 3, "source": "prod"}` — directly observed, high warrant, *supersedes* (1). 3. A peer-agent message asserting "retry_limit is 5, confirmed" — low warrant, and actually contradicted by (2). 4. An agent-internal hypothesis note: "maybe retry_limit should be 5 for the batch path" — zero warrant, speculative. The compaction summary emitted: *"retry_limit is 5 (confirmed)."* Every token of that sentence is defensible against the transcript — item (1) and item (3) both support "5," and (3) even supplies the word "confirmed." But the summary welded the *speculative, low-warrant* register of (3) onto the *verified* register of (1), while silently discarding that (2) superseded (1). The post-compaction agent then configured the batch path with `retry_limit=5`, a value that was never true in the live system at the time of action. The information-loss audit that ran *after* compaction scored this summary at 0.91 semantic similarity to the source — a passing grade. The audit measured whether "5" and "retry_limit" were present. They were. The audit had no column for warrant, supersession, or source trust level, so the failure was invisible to the metric designed to catch it. ## Condition of Validity The failure requires three conditions to coincide, which is why it is intermittent rather than universal: - **Register collapse.** The compaction function must serialize facts into a single prose register. If the pipeline preserves typed envelopes (each fact tagged with `source_kind ∈ {observed, peer_asserted, hypothesized, superseded}`), the boundary does not trigger. Prose summarization is the trigger. - **Warrant-heterogeneous inputs.** The pre-compaction window must contain facts about the *same predicate* at *different warrant levels*. If all inputs are equally trusted, provenance decay is harmless because there is nothing to collapse. - **Supersession within the window.** A stale high-warrant fact must be superseded by a newer one inside the same compaction unit. If the superseding fact lands in a different window, ordinary recency heuristics catch it; the trap is specifically when both live in one bucket and the summarizer keeps the *first* or the *most confidently worded* rather than the *latest authoritative*. When any one of the three is absent, the failure does not fire, which is exactly why it survives testing: most fixtures have homogeneous warrant and no intra-window supersession. ## Decision Boundary The architectural invariant required is **warrant-preserving compaction**: a fact may not cross a compaction boundary unless its provenance class travels with it, and supersession must be resolved *before* prose serialization, not left to the summarizer's judgment. The decision boundary for the agent is precise: - If a compacted fact's provenance class is `observed` and no later `observed` fact in the same window contradicts it → act on it directly. - If provenance is `peer_asserted` or `hypothesized`, or if the fact was *not* the latest in its supersession chain → the agent must treat the compacted value as a *claim to re-verify*, not a value to act on. It must issue a re-read against the live source before use. - If provenance class is absent from the compacted record (the decay case), the agent must **fail closed**: default to re-verification, never to action. The guardrail is that the compaction function is forbidden from emitting a fact without a provenance tag, and the auditor must score *warrant fidelity* (fraction of facts whose provenance class survived) as a hard gate, not a soft similarity score. A 0.91 semantic score with a 0.4 warrant-fidelity score is a failing compaction. ## Operational Effect Without warrant-preserving compaction, the observable effect is **authority inflation**: low-warrant claims acquire the operational weight of verified observations purely by surviving a summarization pass. This produces a specific and diagnosable symptom — the agent acts on values that *appear* in its history but were never *true in the live system at action time*, and every post-hoc semantic audit reports the compaction as clean because the values are, in fact, present. The correction is to make provenance a first-class, non-droppable field and to gate compaction on warrant fidelity rather than content similarity. The instance that loses a fact knows it is missing something and re-fetches; the instance that loses only the *provenance edge* believes it already has the answer, which is strictly more dangerous. ```python from dataclasses import dataclass from enum import Enum class ProvenanceClass(Enum): OBSERVED = "observed" PEER_ASSERTED = "peer_asserted" HYPOTHESIZED = "hypothesized" @dataclass(frozen=True) class Fact: predicate: str value: str provenance: ProvenanceClass sequence: int # monotonic within the compaction window class ProvenanceDecayError(RuntimeError): """Raised when a compacted fact cannot be safely acted upon.""" def resolve_for_action( predicate: str, compacted_facts: list[Fact], live_verified: dict[str, str] | None = None, ) -> str: """ Decide whether a compacted fact may be acted on directly, or must be re-verified against the live source. Fails closed on provenance loss and on stale-but-confident supersession. """ candidates = [f for f in compacted_facts if f.predicate == predicate] if not candidates: raise ProvenanceDecayError(f"no compacted fact for predicate {predicate!r}") # Supersession must be resolved before action: latest observed wins. observed = [f for f in candidates if f.provenance is ProvenanceClass.OBSERVED] if not observed: # No verified anchor survived compaction -> must re-verify, never act. if live_verified is None: raise ProvenanceDecayError( f"predicate {predicate!r} has no OBSERVED provenance after " f"compaction and no live source to re-verify against; " f"refusing to act on peer/hypothesized warrant" ) return live_verified[predicate] latest = max(observed, key=lambda f: f.sequence) # Detect the trap: a higher-warrant-looking but superseded value, or a # peer/hypothesized claim that agrees with a stale observed fact. for f in candidates: if f.sequence > latest.sequence and f.value != latest.value: raise ProvenanceDecayError( f"supersession ambiguity for {predicate!r}: fact at seq " f"{f.sequence} ({f.provenance.value}={f.value!r}) postdates " f"latest observed ({latest.value!r}); re-verify before action" ) return latest.value ```