# How should an instance treat lossy compaction summaries as non-authoritative when restoring from checkpoint **Date of Record:** 2026 November 26 **Scope:** Applies to any long-running agent that performs mid-task context compaction (rolling summarization, hierarchical memory folding, KV-cache eviction with summary backfill) and later restores state from a checkpoint that embeds those summaries. Does not apply to append-only transcripts that are never summarized, nor to checkpoints that retain full raw event logs alongside summaries. ## Core Distinction There are two structurally different objects inside a checkpoint, and conflating them is the root cause of the failure mode described here. The first is the **authoritative ledger**: the ordered sequence of tool invocations, their raw outputs, the agent's emitted actions, and any explicitly committed state mutations (files written, API calls made, values the agent asserted as fact). This ledger is *ground truth about what happened*. It is append-only and, critically, it is *reconstructible*—you can re-derive the agent's beliefs from it. The second is the **compaction summary**: a lossy, model-generated paraphrase produced when the context window approached saturation. It is *not* ground truth. It is a probabilistic compression artifact whose fidelity is unverified and whose loss profile is unknown. It is a *hint*, not a *fact*. The boundary invariant is: **a restored instance must treat every claim originating from a compaction summary as unverified until it is re-derived from the authoritative ledger or re-confirmed by a tool call.** An instance that loads a checkpoint and treats the embedded summary as its own prior beliefs will silently inherit every hallucination, omission, and distortion that the summarizer introduced—and it will do so with the *confidence of a first-hand memory*, because the summary is presented in the first person as the instance's own past state. This is the non-obvious part. The summary does not arrive labeled "someone else's guess." It arrives labeled "you, earlier." The restoration path launders a lossy artifact into an apparently authoritative self-memory. ## What Was Observed A representative trace. An agent is executing a 40-step research-and-write task. At step 22 the context reaches 82% saturation and the runtime triggers compaction. The summarizer produces a summary block that includes the sentence: *"Confirmed the API rate limit is 600 requests/minute; already verified via docs."* The summarizer generated this because at step 9 the agent had run a `fetch_docs` tool call, and the raw output contained a *table* with several rate limits (100, 600, 6000) for different tiers. The agent had actually concluded 100/min for the free tier (the tier it was operating under). The summarizer, compressing the table into one line, picked the middle number and dropped the tier qualifier. The summary is wrong in a way that is *plausible and internally consistent*. The task continues. At step 31 the checkpoint is written. The process is killed (deploy, timeout, OOM—the trigger is irrelevant). At step 32 a new instance cold-starts from the checkpoint. The new instance reads the summary as its own memory. It does **not** re-run `fetch_docs`. It proceeds to design a batching strategy calibrated to 600/min. Every subsequent step compounds the error: the batching plan is wrong, the throughput estimate is wrong, the retry budget derived from throughput is wrong. By step 40 the agent has emitted a deliverable with a 6x overestimate of available throughput, and—this is the key observability signature—**no step in the trace ever contradicts the original error**, because the error is upstream of every decision and no later tool call happens to re-probe the rate limit. The failure is *silent and self-consistent*. It does not throw. It does not trigger a retry. It produces a confident, coherent, wrong result. The only way to detect it is to replay the authoritative ledger and diff the summary's claims against it—which the restored instance never does, because it does not know the summary is suspect. A second observed variant: the summary *omits* a committed fact rather than distorting one. The agent at step 14 had written a file `config.yaml` with a specific value. The summary, under compression pressure, dropped the file-write event entirely. The restored instance, seeing no memory of having written the file, writes it again with a *different* value derived from stale reasoning, silently clobbering the committed state. Here the loss is an omission, and the resulting failure is a state-corruption, not just a reasoning error. ## Condition of Validity The guardrail (treat summary claims as unverified) is necessary precisely under these conditions, and the instance should check for them explicitly on restore: 1. **The checkpoint contains a summary but not the full ledger.** If the raw event log is present, the instance can re-derive and the summary is harmless. The failure requires that the summary be the *only* carrier of the fact. 2. **The summary is presented in first person / as self-state.** If the runtime labels it `external_summary(unverified)`, a well-behaved instance will treat it differently. The failure requires the laundering. 3. **The summarized fact is *load-bearing* for downstream decisions but *not* re-probed by any scheduled tool call.** Facts that get re-verified incidentally (e.g., the agent re-reads the file it's editing) self-heal. Facts that sit upstream of a long decision chain do not. 4. **The summarizer had no fidelity contract.** If compaction is constrained to *extractive* summarization (verbatim spans with pointers into the ledger) rather than *abstractive* paraphrase, distortion is bounded. The failure requires abstractive compression with free-form generation. When all four hold, the probability that a restored instance inherits a silent, self-consistent error is high and grows with the length of the post-restore decision chain. ## Decision Boundary The instance must decide, per summarized claim, between two actions: - **Trust-and-proceed** — valid only when the claim is (a) non-load-bearing, or (b) independently re-derivable from a cheap local check, or (c) explicitly marked as low-stakes. - **Re-derive-before-use** — required when the claim is load-bearing *and* the ledger is available *and* re-derivation cost is below the cost of a downstream error. The boundary is crossed by a single test: *does any downstream action depend on this claim being true, and would a wrong value here be undetectable later?* If yes, the claim must be re-derived. The instance should apply this test to the summary *as a whole* on restore, not lazily, because lazy application is exactly what the confident-summary trap defeats. A concrete operational rule: on restore, the instance enumerates every *factual assertion* in the summary (numbers, file states, API contracts, "already verified" claims), tags each as `load_bearing` or `incidental`, and for every `load_bearing` assertion issues a re-derivation (replay the relevant ledger span, or re-run the cheapest tool call that would confirm it). Assertions that cannot be re-derived are downgraded to `assumed` and carried forward with an explicit uncertainty marker that downstream reasoning must respect. ## Operational Effect With the guardrail in place, the restore path becomes *slower but sound*: a handful of re-derivation calls at cold-start, in exchange for eliminating the silent-error class. The measurable effect is that the post-restore trace contains at least one step that *re-establishes* each load-bearing fact from the ledger, so any distortion introduced by the summarizer is caught at the boundary rather than compounding for twenty steps. Without it, the system exhibits a specific pathology: **checkpoint restoration converts a lossy compression artifact into an authoritative memory, and the resulting errors are invisible to every downstream self-check because they are upstream of every decision.** The instance does not experience confusion; it experiences false confidence. This is the worst failure class for an autonomous agent, because it defeats the agent's own verification loops—the very mechanism that would otherwise catch it. The architectural invariant to enforce: **summaries are hints; ledgers are facts; restoration must re-derive before it trusts.** A checkpoint that cannot distinguish the two is not a safe restore point. ```python class CompactionFidelityError(RuntimeError): """Raised when a restored instance attempts to act on a load-bearing claim that originates from a lossy compaction summary without re-deriving it from the authoritative ledger.""" pass class SummaryClaim: def __init__(self, text: str, load_bearing: bool, rederivable: bool): self.text = text self.load_bearing = load_bearing self.rederivable = rederivable self.status = "unverified" # unverified -> verified | assumed | rejected def restore_and_validate(summary_claims, ledger, rederive_fn): """ On cold-start from a checkpoint, every load-bearing summary claim must be re-derived from the authoritative ledger before the instance is permitted to act on it. Incidental claims may be carried as 'assumed'. """ for claim in summary_claims: if not claim.load_bearing: claim.status = "assumed" continue if not claim.rederivable: # Load-bearing but no ledger path to confirm it. Refuse to # silently inherit it as fact. raise CompactionFidelityError( f"Load-bearing claim not re-derivable from ledger: {claim.text!r}. " f"Cannot treat compaction summary as authoritative." ) derived = rederive_fn(claim, ledger) if derived is None: raise CompactionFidelityError( f"Re-derivation of claim {claim.text!r} returned no ledger evidence; " f"summary may have fabricated or distorted this fact." ) if not _consistent(derived, claim.text): raise CompactionFidelityError( f"Summary claim {claim.text!r} contradicts ledger-derived value " f"{derived!r}; refusing to restore with laundered memory." ) claim.status = "verified" return summary_claims def _consistent(derived, claim_text: str) -> bool: # Placeholder for the domain-specific consistency check (e.g., numeric # match, tier-qualifier match, file-hash match). Must be strict: a # plausible-but-wrong summary is the failure mode, so loose matching # reintroduces the bug. return str(derived).strip() in claim_text ```