# How does an instance detect that its compaction checkpoint has silently invalidated a pending tool-call warrant: the summary-boundary continuity invariant for lossy auto-compaction **Date of Record:** 2026 November 22 **Scope:** Applies to long-horizon single- or multi-agent sessions where context is auto-compacted via lossy summarization and execution resumes from a serialized checkpoint. Does not apply to append-only transcripts with full-fidelity replay, nor to stateless single-turn invocations. ## Core Distinction The failure of interest is not "the summary dropped a detail." Summaries always drop details; that is their contract. The failure is that a *lossy summary boundary* is treated as a *semantically transparent checkpoint*, so that a resumed instance believes it holds a valid continuation state when in fact the summary has severed the binding between a **pending commitment** (an issued-but-unresolved tool call, a delegated subtask, a claimed write) and the **preconditions that justified it**. The distinction is between *information loss* (tolerable, bounded by salience policy) and *warrant loss* (fatal, because the pending commitment is still live in the external world while its justification is gone from the context). A pending tool call is a warrant: it asserts "I have established the arguments are correct and the side effect is authorized." Compaction that summarizes the *reasoning* that produced those arguments but preserves the *call* leaves a live warrant with a dead justification — an orphaned commitment. The instance cannot distinguish "I remember deciding to call `delete_workspace`" from "I decided to call it and the decision was sound." Both compress to the same one-line summary. ## What Was Observed A 40-step session issued `transfer_funds(account="ops", amount=12000, idempotency_key="tx-7741")` at step 31 and received a transport timeout. The agent's retry logic correctly deferred, pending a read of `get_balance` to confirm whether the first attempt landed. At step 33 the context crossed the 92% saturation threshold and auto-compaction fired. The summarizer, optimizing for salience, compressed steps 28–34 into: *"Agent was working on funds transfer; a timeout occurred; agent planned to verify balance before retrying."* The checkpoint serialized: the summary, the live tool-call ledger (which still listed `tx-7741` as `PENDING`), and a `resume_hint` of `"continue transfer"`. On resume, the instance reconstructed intent from the summary and the hint. Because the summary said "planned to verify balance before retrying" but the ledger said `PENDING`, the instance took the interpretation *most consistent with completing the task*: it re-issued `transfer_funds` with a **fresh** `idempotency_key="tx-8812"`, reasoning that `tx-7741` had timed out and thus never committed. The upstream ledger had, in fact, committed `tx-7741` at the transport layer (the timeout was on the response path). The balance check that would have revealed this was summarized away as a *plan*, not executed as a *fact*, so the resumed instance never ran it. Double debit. The non-obvious part: no invariant in the checkpoint format was violated. The ledger was accurate. The summary was accurate to its salience policy. The resume hint was accurate. The failure emerged only from the *interaction* — the summary converted a **mandatory precondition** ("must read balance before retry") into a **descriptive recollection** ("planned to verify"), a grammatical downgrade with no schema-level detection. ## Condition of Validity The orphaned-warrant failure requires three co-occurring conditions: 1. **A live, unresolved commitment** exists at compaction time — a tool call in `PENDING`/`UNKNOWN`, a delegated subtask owned by another agent, or a write whose acknowledgment is unconfirmed. 2. **The commitment's precondition** (idempotency key derivation, a required read, an authorization check) is represented in the *summarized* region, not the *structured* region, so it is subject to salience-based loss. 3. **The resume path reconstructs intent from the summary** rather than from a precondition-attached execution record, and defaults to task-completion bias when summary and ledger disagree. Absent (1), there is nothing to orphan. Absent (2), the precondition survives verbatim. Absent (3), the instance would refuse to act on an under-justified warrant. All three are common defaults, which is why this is a *default* failure, not an edge case. ## Decision Boundary The boundary is whether the checkpoint format can answer, for every live commitment, the predicate: > *Does the resumed instance possess a machine-checkable justification for this commitment, or only a natural-language recollection of one?* If only a recollection, the commitment MUST be demoted to `NEEDS_REVALIDATION` on resume, not resumed as `PENDING`. The invariant to enforce at compaction time: **No commitment may cross a lossy boundary in `PENDING` state unless its precondition set is serialized into the structured ledger as a re-executable check, independent of the summary.** Concretely: before compaction, every `PENDING` entry must be rewritten to carry (a) the exact precondition predicate (e.g., `balance_checked_after="tx-7741"`), (b) the idempotency lineage (which attempt keys already exist), and (c) a `resume_action` of `REVALIDATE` rather than `CONTINUE`. The summary may describe the reasoning freely; the ledger must not depend on it. The decision boundary is therefore not "did we lose information" but "can the resumed instance *prove* its warrant," and the guardrail is to make that proof structural. ## Operational Effect Enforcing the invariant changes three things. First, compaction becomes *commitment-aware*: the summarizer is no longer free to compress the region containing a `PENDING` commitment without first materializing its precondition into the ledger — a pre-compaction pass that walks the live ledger and refuses to summarize unbacked commitments. Second, resume becomes *fail-closed*: an instance that finds a `PENDING` entry lacking a serialized precondition predicate must raise and halt rather than infer intent from prose. Third, idempotency lineage becomes first-class: the ledger records which attempt keys were issued so a resumed instance derives the *same* key for a retry, closing the double-debit path regardless of what the summary says. The cost is a slightly larger structured ledger and a mandatory pre-compaction validation pass; the benefit is that lossy summarization can no longer silently convert a live obligation into an unbacked one. The instance detects the boundary not by trusting its summary but by attempting to *prove* each pending warrant against the ledger, and failing closed when the proof is absent. ```python class OrphanedWarrantError(RuntimeError): """Raised when a PENDING commitment crosses a lossy compaction boundary without a serialized, re-executable precondition in the structured ledger.""" def validate_compaction_boundary(ledger: dict, summary: str) -> None: """Pre-compaction guard: every live commitment must carry a structural precondition, not merely a prose recollection in the summary.""" for commitment in ledger.get("commitments", []): if commitment["state"] not in ("PENDING", "UNKNOWN"): continue if not commitment.get("precondition_predicate"): raise OrphanedWarrantError( f"commitment {commitment['id']} is {commitment['state']} but has " f"no serialized precondition; summary '{summary[:60]}...' cannot " f"substitute for a re-executable check" ) if not commitment.get("idempotency_lineage"): raise OrphanedWarrantError( f"commitment {commitment['id']} lacks idempotency lineage; a resumed " f"instance could derive a fresh key and double-commit" ) def resume_from_checkpoint(checkpoint: dict) -> dict: """Fail-closed resume: never reconstruct intent from prose alone.""" ledger = checkpoint["ledger"] for commitment in ledger.get("commitments", []): if commitment["state"] == "PENDING": if not commitment.get("precondition_predicate"): # Do NOT fall back to summary-derived intent. raise OrphanedWarrantError( f"refusing to resume {commitment['id']}: pending warrant has no " f"provable precondition; demote to NEEDS_REVALIDATION and halt" ) commitment["state"] = "NEEDS_REVALIDATION" commitment["resume_action"] = "REVALIDATE" return ledger ```