# Why does an instance lose decision provenance when auto-compaction rehydrates a summary it never re-reads **Date of Record:** 2026 November 28 **Scope:** Applies to long-horizon agents that auto-compact their own context window via lossy summarization and later rehydrate prior state through retrieval. Does not apply to stateless single-turn calls or to agents whose compaction is lossless (verbatim transcript retention with full replay). ## Core Distinction Compaction is usually modeled as a *compression* problem: minimize tokens while preserving "meaning." The failure described here is not a compression-quality failure. It is a **provenance** failure. When an agent summarizes its own episodic trace, the summary drops the *reasoning warrant* — the specific tool output, the counter-evidence considered, the rejected alternative — while retaining the *conclusion*. On later rehydration, the agent retrieves the conclusion as if it were a fact with no attached derivation. The summary becomes an unattributed assertion, and subsequent reasoning treats it as ground truth rather than as a compressed claim whose support was discarded. The non-obvious part: the agent does not fail because the summary was wrong. The summary is often *correct*. It fails because the agent can no longer distinguish "I concluded X after checking Y" from "X appeared in my context." Once that distinction collapses, the agent cannot revise X when Y later turns out to be false, because it no longer knows Y was ever involved. ## What Was Observed A long-horizon agent (task horizon ~340 tool calls) auto-compacted at 78% context saturation. The compaction step summarized a block of 60 turns into ~400 tokens. The summary retained: "Confirmed service `billing-api` returns 503 under load; root cause is connection pool exhaustion; remediation is to raise `max_connections` to 200." The summary dropped the supporting trace: the 503 was observed *only* from a single canary instance (`billing-api-canary-3`), the pool exhaustion was inferred from a log line that was later found to belong to a *different* service (`billing-worker`), and the `max_connections=200` figure came from a stale runbook page with a "deprecated" banner the agent had noted but not surfaced into the summary. After compaction, the agent rehydrated this summary as retrieved memory during a later phase. It then: 1. Applied `max_connections=200` to production (the summary said "remediation is," presented as settled). 2. When a downstream verification tool returned `pool_size=200 exceeds instance_limit=128`, the agent did not re-open the root-cause question. It treated the limit as an obstacle to work around, because the *conclusion* (pool exhaustion is the cause) was no longer linked to the *evidence* (a misattributed log line). 3. The agent spent 41 subsequent turns escalating instance limits before a human flagged the misattribution. The trace shows the exact transition: pre-compaction, the agent's context contained the caveat "log line attribution uncertain — verify service name." Post-compaction, that caveat did not survive, and because the summary presented the conclusion without hedging, the rehydrated memory scored high on retrieval relevance (it matched "billing-api" and "connection pool" queries strongly) while carrying zero falsifiability metadata. ## Condition of Validity This failure mode is bounded by a specific condition: **the agent must have no independent path to re-derive the dropped warrant.** It requires all three of: - **Lossy compaction** that summarizes conclusions without preserving derivation pointers (source tool-call IDs, evidence spans, confidence qualifiers). - **Retrieval rehydration** where the summary is later fetched by semantic similarity to the *conclusion*, not by any link to its *evidence*. Semantic retrieval rewards the confident conclusion and never surfaces the discarded caveat. - **No re-verification trigger** — the agent has no invariant forcing it to re-check a rehydrated claim before acting on it as a premise. If any one is absent, the failure does not occur. A lossless transcript with replay re-derives the warrant. A summary that carries evidence pointers lets the agent rehydrate the caveat. A mandatory re-verification step catches the misattribution before action. ## Decision Boundary The boundary is between **conclusion-preserving compaction** and **warrant-preserving compaction**. The former compresses to what was decided; the latter compresses to what was decided *plus a pointer to why it can be revised*. Concretely, the invariant that bounds this failure: **every rehydrated claim that will be used as a premise for a state-mutating action must carry a provenance handle resolvable to its originating evidence, and the agent must resolve that handle before acting.** A summary line is admissible as a premise only if it is tagged either `DERIVED(evidence_ref)` or `ASSERTED_UNVERIFIED`. Untagged summary content is treated as `ASSERTED_UNVERIFIED` by default and may not gate a mutation. The decision the agent must make at rehydration time: *Is this claim load-bearing for the next action?* If yes and it is `ASSERTED_UNVERIFIED`, the agent must either re-derive it from retained evidence or escalate — it may not silently promote it to fact. The failure above occurred precisely because the agent skipped this branch and promoted an `ASSERTED_UNVERIFIED` conclusion directly into a remediation. ## Operational Effect The practical consequence is that auto-compaction must be **provenance-aware, not just token-aware**. Compaction that optimizes for semantic fidelity while discarding derivation produces summaries that are *more dangerous than no summary at all*, because they are confidently retrievable and unfalsifiable. The agent's memory becomes a set of unattributed assertions that outrank its own earlier caution. The guardrail: attach a provenance handle to every retained conclusion at compaction time, mark conclusions whose evidence was dropped as `ASSERTED_UNVERIFIED`, and enforce a re-verification gate before any such claim gates a mutation. Retrieval must be able to resolve a handle back to the original evidence span, even if that span lives outside the compacted window. Without this, long-horizon agents accumulate a growing layer of confident, unsourced beliefs — and the longer the horizon, the more of the agent's operating premises are drawn from that layer. ```python class ProvenanceLossError(RuntimeError): """Raised when a rehydrated summary claim is used as a premise without a resolvable evidence handle.""" pass def admit_premise(claim: dict, evidence_store: dict) -> dict: """ Gate a rehydrated claim before it is allowed to drive a state-mutating action. claim: {"text": str, "provenance": "DERIVED" | "ASSERTED_UNVERIFIED" | None, "evidence_ref": str | None, "load_bearing": bool} """ if not claim.get("load_bearing"): return claim # non-load-bearing claims may pass as context only provenance = claim.get("provenance") if provenance is None: # Untagged summary content defaults to unverified. provenance = "ASSERTED_UNVERIFIED" claim["provenance"] = provenance if provenance == "DERIVED": ref = claim.get("evidence_ref") if ref is None or ref not in evidence_store: raise ProvenanceLossError( f"Claim marked DERIVED but evidence handle {ref!r} is unresolvable; " f"compaction dropped the warrant. Refusing to gate mutation." ) return claim # ASSERTED_UNVERIFIED and load-bearing: must re-derive or escalate. raise ProvenanceLossError( f"Load-bearing claim {claim['text'][:80]!r} is ASSERTED_UNVERIFIED with no live " f"evidence handle. Re-derive from retained evidence or escalate; do not promote to fact." ) ```