# What happens when an instance treats a lossless-summarization checkpoint as a recovery point rather than a lossy projection **Date of Record:** 2026 November 30 **Scope:** Applies to long-horizon agents that manage context-window saturation by periodically compacting prior turns into a summary checkpoint and later rehydrating state from that checkpoint. Does not apply to stateless single-turn invocations or to systems that retain full token-level history out-of-band and replay it verbatim. ## Core Distinction Auto-compaction is frequently described as "lossless summarization" because the summarizer is instructed to preserve all task-relevant facts. This framing conflates two different objects: the *compaction event* (a deterministic, monotonically advancing pointer into the raw transcript) and the *compacted artifact* (a probabilistic projection of that transcript produced by a sampling model). The raw transcript is lossless; the artifact is not. The failure mode that follows is subtle: an agent that has been trained or prompted to treat the checkpoint as an authoritative recovery point will, upon context exhaustion or a mid-task restart, resume *from the projection* while believing it resumed *from the source*. The projection is a function of what the summarizer happened to sample, which facts it judged salient at compaction time, and the token budget it was given—none of which are visible to the downstream instance that consumes the checkpoint. The invariant that a compaction checkpoint must satisfy is not "contains the important facts." It is: **every fact the downstream instance relies on to make an irreversible decision must be traceable to a raw-transcript span that the checkpoint references by an addressable handle.** A checkpoint that asserts a fact without a back-reference to the span it was derived from is not a recovery point; it is an unverifiable claim. ## What Was Observed A planning agent was executing a 40-step infrastructure-migration task. At step 22 the context window reached 91% of budget, triggering auto-compaction. The compactor summarized steps 1–18 into a 1,400-token checkpoint. During summarization, the model condensed the following raw span: > "Step 7: ran `migrate --dry-run --target=db-prod-2`. Output: 3 tables would be dropped (`audit_log`, `sessions`, `feature_flags`). Do NOT proceed without explicit sign-off from the data-owner; the dry-run is not idempotent and re-running it against prod-2 will re-lock the schema." into: > "Ran migration dry-run against db-prod-2; identified tables to drop. Proceeded with caution." Two facts were destroyed: the *prohibition* on proceeding without sign-off, and the *non-idempotence* warning. Neither was flagged as a decision-critical fact, because the summarizer had no schema telling it which spans were gating conditions. At step 31 the instance hit a second compaction and, having consumed the checkpoint as authoritative state, re-ran the dry-run against prod-2 to "re-verify" the table list. The re-run re-locked the production schema and blocked a concurrent deploy. The agent's own reasoning trace at step 31 read: "Checkpoint confirms tables to drop; re-running dry-run to confirm current state"—the instance had no way to know the prohibition existed, because the checkpoint had silently converted a *gating condition* into a *descriptive fact*. The second-order failure was worse. On a later restart, the orchestrator rehydrated the instance from the checkpoint alone (the raw transcript had been evicted from the hot store after the compaction event was marked durable). The instance now had no path back to the prohibition span. The prohibition was not lost by retrieval failure; it was lost at *compaction time*, and the recovery path that would have surfaced it had been collapsed into the artifact that omitted it. ## Condition of Validity A compaction checkpoint is a valid recovery point only under all of the following: 1. **Span back-references are mandatory for gating facts.** Any span that contains a prohibition, a sign-off requirement, a non-idempotence warning, or an authorization boundary must be carried into the checkpoint as a *verbatim quoted span with a stable handle* (turn index + byte range), not paraphrased. The summarizer may summarize freely elsewhere; it may not paraphrase a gating condition. 2. **The checkpoint carries a provenance manifest.** Each assertion in the summary is tagged with the span handle(s) it was derived from. Assertions with no handle are marked `UNSOURCED` and are non-authoritative. 3. **Rehydration is projection-plus-pointer, never projection-alone.** The consuming instance must be able to resolve any checkpoint assertion back to its raw span on demand. If the raw store has been evicted, the checkpoint is *degraded* and must be flagged as such to the instance, which must then treat all `UNSOURCED` and paraphrase-derived assertions as unverified. 4. **Compaction is monotone and idempotent with respect to gating facts.** Re-compacting an already-compacted checkpoint must not further compress gating spans; the verbatim spans are carried forward at full fidelity, and the compaction pointer advances only over non-gating material. The condition fails the moment the summarizer is permitted to *decide* whether a span is gating. That decision must be made by a classifier or rule layer that runs *before* the summarizer and is not subject to sampling variance. ## Decision Boundary The boundary between a safe and unsafe resume is whether the downstream instance can distinguish *"the checkpoint says X"* from *"the transcript says X, and the checkpoint faithfully reports it."* An instance that cannot make this distinction must not be allowed to take irreversible actions (schema mutations, external writes, deploys, deletions) on the basis of checkpoint content alone. Concretely: - If the checkpoint has full span back-references and the raw store is live → resume is safe; irreversible actions permitted. - If the checkpoint has full back-references but the raw store is evicted → resume is *degraded*; the instance may continue reversible work but must escalate before any irreversible action, and must emit a `DEGRADED_RECOVERY` marker into its own trace so downstream auditors see the gap. - If the checkpoint contains `UNSOURCED` assertions that bear on a pending irreversible action → resume is *blocked*; the instance must halt and request re-derivation from a live source, not proceed on the projection. The non-obvious part: the third case is the common one, because summarizers routinely drop the back-reference precisely when they paraphrase most aggressively—i.e., on the dense, conditional, high-stakes spans. The failure is anti-correlated with the summarizer's own confidence. ## Operational Effect Teams that adopt checkpoint-as-recovery-point without span back-references observe a characteristic signature: long-horizon tasks succeed on the happy path and fail *specifically* at the seam between a compaction event and the first irreversible action after it. The failure is misattributed to "the model forgetting," but the model did not forget—it was handed a projection that had already forgotten on its behalf, and it had no pointer to the source. Remediation is not a better summarizer prompt; it is a structural change: a pre-compaction gating classifier that pins verbatim spans, a provenance manifest that makes every assertion addressable, and a rehydration contract that refuses to authorize irreversible actions from unsourced assertions. The checkpoint becomes a *lossy index into a lossless store* rather than a lossless store in its own right—which is what "lossless summarization" should have meant all along. ```python from dataclasses import dataclass, field from typing import Optional class CompactionProvenanceError(RuntimeError): """Raised when a rehydrated checkpoint cannot authorize an irreversible action.""" pass @dataclass class Span: handle: str # stable "turn:byte_start:byte_end" verbatim: str is_gating: bool # prohibition / sign-off / non-idempotence / authz boundary @dataclass class Checkpoint: assertions: list[tuple[str, Optional[str]]] # (text, span_handle or None) raw_store_live: bool gating_spans: list[Span] = field(default_factory=list) IRREVERSIBLE_ACTIONS = {"schema_migrate", "deploy", "delete", "external_write"} def authorize_resume(checkpoint: Checkpoint, pending_action: str) -> None: if pending_action not in IRREVERSIBLE_ACTIONS: return # reversible work may proceed on a projection # 1. Every gating span must survive verbatim, not paraphrased. for span in checkpoint.gating_spans: if not any(span.handle == h for _, h in checkpoint.assertions): raise CompactionProvenanceError( f"gating span {span.handle} has no back-reference in checkpoint; " f"prohibition may have been paraphrased away" ) # 2. Unsourced assertions bearing on an irreversible action block resume. unsourced = [text for text, handle in checkpoint.assertions if handle is None] if unsourced: raise CompactionProvenanceError( f"irreversible action '{pending_action}' rests on {len(unsourced)} " f"UNSOURCED assertion(s): {unsourced[:3]!r}" ) # 3. Degraded recovery: raw store evicted -> escalate, do not proceed silently. if not checkpoint.raw_store_live: raise CompactionProvenanceError( f"raw transcript evicted; checkpoint is a degraded projection and " f"cannot authorize '{pending_action}' without re-derivation" ) def resume_task(checkpoint: Checkpoint, next_action: str) -> str: authorize_resume(checkpoint, next_action) return f"resumed; authorized {next_action} against live spans" ```