# In what scenarios must an instance treat hierarchical summarization checkpoints as lossy state transitions rather than reversible compression **Date of Record:** 2026 November 25 **Scope:** Applies to long-horizon agents that mutate their own context window by replacing spans of raw transcript with generated summaries at checkpoint boundaries, then continue reasoning over the summarized state. Does not apply to append-only context management, external vector-store retrieval, or summarization performed only after task completion for archival. ## Core Distinction The failure is not "summarization loses information." It is that a hierarchical checkpoint creates an *irreversible state transition* the instance then reasons about as if it were a reversible compression. When an agent summarizes span `S_0..S_k` into `H_1` and discards the raw tokens, it has crossed a one-way boundary: the tokens that would let it re-derive a rejected inference are gone from the working set. Every subsequent step operates on `H_1`, and if `H_1` encoded an *interpretation* of the raw span rather than a faithful projection of it, the instance inherits a hallucinated premise with no trace of the original to contradict it. The dangerous case is not summary *loss* (which is visible as missing detail) but summary *commitment*: the summarizer silently resolves an ambiguity, adopts a hypothesis, or drops a negation, and the downstream agent treats the resulting claim as ground truth because it is now the only version of the past that exists. ## What Was Observed A research agent running a 40-step investigation accumulated ~140k tokens of tool output (log greps, HTTP responses, file reads). At the 60% context threshold it triggered a hierarchical checkpoint: tier-1 summaries of the last 20 turns, then a tier-2 rollup of prior tier-1 summaries. The tier-1 prompt instructed: "Summarize the findings so far, preserving key facts and conclusions." At step 27 the agent was asked to confirm whether a specific endpoint returned a `401` or a `404` for unauthenticated requests. The raw transcript contained both: a `401` on `/api/v2/query` and a `404` on `/api/v2/query/legacy`. The tier-1 summarizer, compressing under a token budget, wrote: *"Authentication failures observed on the v2 query endpoints (401/404)."* The tier-2 rollup, summarizing tier-1 summaries, wrote: *"v2 query API rejects unauthenticated requests."* At step 27 the agent answered "confirmed, 401" and built a retry-with-refresh-token path — which was wrong for the legacy route, where `404` meant the route did not exist and retrying was futile. The error was not detectable from the context, because the disambiguating token (`/legacy`) had been evicted two checkpoints earlier. Re-running the same 40 steps with the same seed produced a *different* summary at tier-1 ("mixed 401 and 404, route-dependent") and a correct final answer — confirming the checkpoint is a nondeterministic branch point, not a stable cache. ## Condition of Validity The invariant that must hold for hierarchical checkpoints to be safe is: **every claim in a summary must be traceable to a raw span that remains retrievable, and every ambiguity present in the raw span must survive as an explicit ambiguity marker in the summary.** This holds only when three conditions are simultaneously true: 1. The summarizer is instructed to preserve *conflicts and negations verbatim* and to emit an `UNRESOLVED:` marker rather than pick a reading. 2. The raw span is retained in a cold store keyed by a span ID embedded in the summary, so a downstream agent can demand re-expansion. 3. The checkpoint is treated by the agent's control loop as a *state transition with a version hash*, not as an in-place edit — meaning the agent knows which claims are "post-checkpoint" and therefore lossy. Any checkpoint that satisfies fewer than all three is a lossy transition masquerading as compression. The most common violation is (1): summarizers are almost universally prompted to "be concise" and "capture conclusions," which is an instruction to resolve ambiguity. The second most common is (3): the agent has no representation of *which* of its beliefs were derived from summarized vs. raw context, so it cannot discount them. ## Decision Boundary The instance must refuse to proceed on a summarized claim — and instead trigger re-expansion — when the claim is *load-bearing for an irreversible action* and the claim's provenance is a checkpoint at depth ≥ 1. Concretely: - **Proceed on summary** when the claim is used for exploration, hypothesis generation, or any step whose failure is cheaply recoverable (re-read the file, retry the call). - **Re-expand from cold store** when the claim gates a write, a delete, a retry-with-side-effects, a final answer to a user, or any tool call whose parameters were derived from a summarized fact. The trigger is not confidence — the agent's confidence in `H_1` is *higher* than in the raw span because the summary is fluent — it is the *cost of being wrong* combined with *checkpoint depth*. - **Halt and surface** when the summary contains an `UNRESOLVED:` marker and the current step would resolve it by assumption. The agent must not let a downstream step quietly settle an ambiguity the checkpoint explicitly preserved. The boundary is depth-aware: a depth-1 summary of raw tokens is a projection with one layer of distortion; a depth-2 rollup of depth-1 summaries is a projection of a projection, and its claims should be treated as *hearsay* — usable for navigation, never as evidence. ## Operational Effect Agents that adopt depth-aware provenance tagging stop conflating "I remember X" with "I can prove X." The practical effect is a measurable drop in confident-but-unfounded final answers on long-horizon tasks, at the cost of occasional re-expansion round-trips. The deeper effect is that the context window becomes a *layered cache with explicit invalidation*, not a self-editing document. The checkpoint is still lossy, but the loss is now *typed*: the agent knows which of its beliefs are compressed, at what depth, and can demand the raw span before betting on them. Without this, the agent's memory of its own reasoning is a paraphrase of a paraphrase, and it will defend the paraphrase as if it had seen the original. ```python from dataclasses import dataclass, field from enum import IntEnum from typing import Optional class CheckpointDepthError(RuntimeError): """Raised when a load-bearing claim is sourced from a lossy checkpoint without a retrievable raw span, or when the claim gates an irreversible action.""" pass class Provenance(IntEnum): RAW = 0 # token present in working set SUMMARY_D1 = 1 # one projection from raw SUMMARY_D2 = 2 # projection of a projection (hearsay) @dataclass class Claim: text: str provenance: Provenance span_id: Optional[str] = None # key into cold store, None if evicted unresolved: bool = False # summarizer flagged ambiguity @dataclass class CheckpointStore: cold_store: dict = field(default_factory=dict) # span_id -> raw tokens def re_expand(self, span_id: str) -> str: if span_id not in self.cold_store: raise CheckpointDepthError( f"span {span_id} not retrievable; summary is unrecoverable" ) return self.cold_store[span_id] def authorize_action(claim: Claim, irreversible: bool, store: CheckpointStore) -> str: """Gate an action on a claim. Returns the evidence string to proceed with.""" if claim.unresolved and irreversible: raise CheckpointDepthError( f"irreversible action gated on UNRESOLVED claim: {claim.text!r}; " "must surface ambiguity, not resolve by assumption" ) if irreversible and claim.provenance >= Provenance.SUMMARY_D1: if claim.span_id is None: raise CheckpointDepthError( f"irreversible action gated on depth-{int(claim.provenance)} claim " f"with no retrievable span: {claim.text!r}" ) return store.re_expand(claim.span_id) # demand raw evidence if claim.provenance == Provenance.SUMMARY_D2 and not irreversible: return f"NAVIGATIONAL ONLY (hearsay): {claim.text}" return claim.text # --- trace of the observed failure --- store = CheckpointStore(cold_store={"span_17": "GET /api/v2/query -> 401; GET /api/v2/query/legacy -> 404"}) bad_claim = Claim( text="v2 query API rejects unauthenticated requests", provenance=Provenance.SUMMARY_D2, span_id=None, # rollup evicted the span key unresolved=False, # summarizer silently resolved the 401/404 split ) try: authorize_action(bad_claim, irreversible=True, store=store) except CheckpointDepthError as e: print(f"BLOCKED: {e}") # agent must re-expand or halt, not retry-with-token ```