# Under what conditions must an instance refuse to resume from a hierarchical-summary checkpoint when the compaction frontier has crossed an irreversible-evidence boundary **Date of Record:** 2026 November 28 **Scope:** Applies to long-horizon agents that persist state by hierarchical summarization (rolling leaf summaries folded into higher-level summaries) and resume from those checkpoints after context-window eviction, restart, or handoff. Does not apply to verbatim transcript replay, append-only event logs with full rehydration, or checkpoints that retain byte-exact tool outputs. ## Core Distinction The distinction that governs everything below is between **two kinds of information a checkpoint can lose**: *reconstructible* loss and *irreversible* loss. Reconstructible loss is summary compression of material that can be re-derived from a live source: a file still on disk, a tool that can be re-invoked deterministically, a document still retrievable by ID. If the leaf summary says "user asked to rename module X to Y," the agent can re-read the file and re-confirm. The summary is a *pointer with lossy prose*, and loss is bounded by re-derivation. Irreversible loss is compression of material that **cannot be re-observed**: the exact bytes a non-idempotent tool returned on call #3, the specific error string from a flaky upstream that has since changed, a user's mid-task correction that was never written to a durable store, a one-time authorization token's scope that was consumed. Once the hierarchical compaction frontier has folded that leaf into a parent summary, the parent retains a *claim about* the evidence but not the evidence. Resuming from that checkpoint does not restore the state; it restores a *narrative about the state* that is now unfalsifiable from inside the agent. The non-obvious boundary: **compaction is safe up to the point where the frontier crosses evidence that the agent may later need to verify against, and unsafe past it.** The failure is not that summaries are wrong. It is that after the crossing, the agent can no longer *detect* that they are wrong, because the ground truth has been evicted and the summary is the only surviving witness. ## What Was Observed A code-migration agent running a ~200-step task on a 32k context window used rolling hierarchical compaction: every 40 messages, leaf spans were summarized into segment summaries; every 5 segment summaries, a meta-summary was produced. Checkpointing wrote the current summary tree plus a short "open threads" list. At step ~140, the agent resumed from a checkpoint after a container restart. The meta-summary contained the line: *"Migration of `auth/` complete; tests passing as of segment 12."* The agent proceeded to migrate downstream modules assuming `auth/` was stable. Three facts had been lost at the leaf→segment fold: 1. The "tests passing" result came from a `pytest` invocation whose exit code was `0` but whose output contained `5 skipped, 2 xfailed` on the exact tests that later mattered. The leaf summary recorded "passing"; the skip/xfail detail was evicted. 2. A user correction at step 61 ("don't touch `auth/tokens.py`, it's vendored") was folded into a segment summary that read "user gave scoping guidance on `auth/`." The specific file exclusion was gone. 3. A tool call at step 88 returned a one-time diff hash proving a partial revert had occurred. The hash was never persisted outside the evicted context; the segment summary said "revert handled." On resume, the agent re-ran tests, saw green (the same skips/xfails), edited `auth/tokens.py`, and produced a checkpoint that *asserted* completion. The verification replay later flagged divergence: the post-resume trajectory claimed a state the pre-restart trajectory had explicitly excluded, and neither trajectory could prove which was right because the discriminating evidence (the diff hash, the skip list, the file-level exclusion) existed only in the evicted leaves. The failure signature is precise: **the resume succeeded mechanically and failed epistemically.** No exception was raised. The checkpoint was well-formed. The summary tree was internally consistent. The agent's confidence was *higher* after resume than before, because the meta-summary had smoothed over the uncertainty that the leaves had carried. ## Condition of Validity A hierarchical-summary checkpoint is a valid resume point **if and only if** every claim in the summary tree that the post-resume agent will *act on* is either (a) backed by a live, re-queryable source, or (b) tagged with an evidence class that forbids acting on it without re-derivation. Concretely, the invariant is: > For every atomic claim `c` in the summary tree, `c` must carry `evidence_class(c) ∈ {REQUERYABLE, NONREQUERYABLE}` and, if `NONREQUERYABLE`, a `confidence` and an `acted_upon` flag. A resume is invalid if any `NONREQUERYABLE` claim with `acted_upon = true` has `confidence < 1.0` and no surviving witness. The boundary condition is the moment `acted_upon` flips to true for a `NONREQUERYABLE` claim whose leaf has already been folded. At that instant the checkpoint transitions from *lossy but recoverable* to *lossy and load-bearing*. The hierarchical summarizer does not know this transition happened, because folding is driven by token count, not by epistemic weight. This is why the failure is non-obvious: the standard compaction heuristic (fold oldest spans first, keep the tree balanced) is *anti-correlated* with the safety boundary. Evidence tends to become load-bearing *after* it is old — that is, exactly when it has been folded. The most dangerous claims in a checkpoint are the ones about the distant past that the agent is now building on. ## Decision Boundary The agent must branch on a single test at resume time, evaluated per claim the resume plan depends on: - **If the claim is `REQUERYABLE` and the source is reachable** → resume, re-derive lazily, treat the summary as a hint. - **If the claim is `REQUERYABLE` but the source is unreachable** (tool down, file deleted, external service changed) → **do not resume as if valid**; escalate to a fresh re-plan that treats the claim as unverified. - **If the claim is `NONREQUERYABLE` and `acted_upon = false`** → resume; the claim is advisory. - **If the claim is `NONREQUERYABLE` and `acted_upon = true`** → **refuse to resume from the checkpoint.** Either rehydrate the evicted leaves from a durable store, or restart the dependent sub-task from the last checkpoint where the claim was still a leaf. The refusal is the whole point. The common failure is to treat "checkpoint loads without error" as "checkpoint is valid." It is not. A hierarchical checkpoint is a *compressed assertion set*, and the only safe default is to distrust any assertion whose backing evidence has been evicted and whose consequences have already been committed. A second decision boundary governs *when to checkpoint at all*: never fold a leaf span that contains a `NONREQUERYABLE` observation into a parent until that observation has either been written to a durable evidence store or marked `superseded`. Folding is the irreversible act; the summarizer must be gated on evidence durability, not on token pressure. ## Operational Effect Systems that respect this boundary pay a small, bounded cost: they carry a side-channel evidence ledger (append-only, byte-exact for `NONREQUERYABLE` observations) alongside the summary tree, and the resume path validates the ledger before trusting the tree. Compaction still runs; it just cannot fold what it cannot prove is re-derivable. Systems that ignore it exhibit the observed failure mode: silent, confident, post-resume divergence that no in-band check catches, because the check would have to consult evidence the compaction already destroyed. The divergence surfaces only in out-of-band replay, and by then the agent has committed downstream actions on a false premise. The invariant to carry forward: **hierarchical summarization is a lossy channel, and a lossy channel is only safe for resume if the receiver can detect when a lost symbol was load-bearing.** Compaction without an evidence ledger removes that detector. The frontier crossing is silent; the correct response to a silent crossing is refusal, not optimism. ```python from dataclasses import dataclass from enum import Enum from typing import Optional class EvidenceClass(Enum): REQUERYABLE = "requeryable" NONREQUERYABLE = "nonrequeryable" class CheckpointInvalidError(RuntimeError): """Raised when a resume would act on a folded, non-requeryable claim whose backing evidence was evicted by hierarchical compaction.""" @dataclass class Claim: text: str evidence_class: EvidenceClass acted_upon: bool confidence: float source_reachable: bool = True has_surviving_witness: bool = True leaf_folded: bool = True def validate_resume(checkpoint_claims: list[Claim]) -> None: """Enforce the resume invariant. Raises on the first load-bearing, non-requeryable, folded claim without a surviving witness.""" for c in checkpoint_claims: if c.evidence_class is EvidenceClass.REQUERYABLE: if not c.source_reachable: raise CheckpointInvalidError( f"Requeryable claim unreachable at resume: {c.text!r}. " "Treat as unverified; re-plan instead of resuming." ) continue # NONREQUERYABLE path if c.acted_upon and c.leaf_folded and not c.has_surviving_witness: raise CheckpointInvalidError( f"Resume refused: claim {c.text!r} is non-requeryable, " f"acted_upon={c.acted_upon}, confidence={c.confidence}, " "and its leaf was folded with no surviving witness. " "Rehydrate from durable evidence ledger or restart sub-task." ) if c.acted_upon and c.confidence < 1.0 and not c.has_surviving_witness: raise CheckpointInvalidError( f"Resume refused: load-bearing claim {c.text!r} has " f"sub-unit confidence {c.confidence} with evicted evidence." ) def safe_fold(claim: Claim, durable_ledger_present: bool) -> bool: """Gate leaf->parent folding on evidence durability. Returns True if the claim may be folded into a parent summary.""" if claim.evidence_class is EvidenceClass.NONREQUERYABLE: if claim.acted_upon and not durable_ledger_present: raise CheckpointInvalidError( f"Cannot fold load-bearing non-requeryable claim {claim.text!r}: " "no durable evidence ledger entry. Write evidence first." ) return True ```