# Where must an instance reconcile compaction summaries against retrieval-backed reconstruction before resuming a tool loop **Date of Record:** 2026 November 28 **Scope:** Applies to long-running agent instances that maintain a rolling conversation/working state, trigger lossy summarization when the context window approaches a token budget, and rely on a retrieval index over evicted turns to reconstruct detail. Does not apply to stateless single-shot calls or to instances whose entire history fits within the active window with no eviction. ## Core Distinction The critical distinction is between *summary fidelity* and *reconstruction authority*. A compaction summary is a lossy, model-generated paraphrase of evicted turns. A retrieval-backed reconstruction is a verbatim pull of specific evicted spans, keyed by a query. These are two different artifacts with different trust properties, and the failure mode emerges when an instance treats the summary as the authoritative record and the retrieval layer as a mere convenience. The invariant that must hold at every resume point is: **any fact the agent is about to act on that originated in an evicted turn must be traceable to either (a) a verbatim reconstruction, or (b) an explicit, confidence-tagged summary assertion — and the two must not silently disagree.** When they disagree and the agent does not notice, the summary's distortion becomes the operative ground truth. This is not a retrieval miss; it is a *reconciliation miss*. ## What Was Observed An instance was executing a multi-step provisioning task over roughly 340 turns. At turn 210 the compactor fired against a 90k-token budget and summarized turns 1–180 into a ~1,400-token digest. The digest contained the sentence: *"User approved the staging database resize to 64GB."* The verbatim turn 47, retrievable from the eviction index, actually read: *"Do not resize staging beyond 32GB until the migration window closes; 64GB is the target for production only."* The summarizer had collapsed two clauses across a negation boundary and reassigned the 64GB figure from production to staging. This is a classic lossy-summarization distortion: the negation `Do not ... until` and the scope qualifier `production only` are exactly the tokens a budget-constrained summarizer drops first, because they carry low lexical salience relative to the numeric and noun content. At turn 260 the agent, working from the summary, issued a resize tool call to 64GB. It did not call retrieval first, because the summary presented the fact as settled. The retrieval index *had* the correct span and would have returned it for the query `staging resize limit`, but no query was issued — the agent had no signal that a query was warranted. The distortion was invisible from inside the summary. The failure is not that retrieval was wrong. Retrieval was correct and available. The failure is that the resume path had no step that *forced* reconciliation between a summary assertion and its source span before that assertion was used to authorize an irreversible action. ## Condition of Validity The reconciliation obligation is valid — and must be enforced — under the conjunction of three conditions: 1. **Eviction occurred.** At least one turn relevant to the pending action lives outside the active window and only in the summary plus index. 2. **The pending action is irreversible or scope-narrowing.** A resize, a delete, a send, a commit, a payment. Read-only exploration does not require reconciliation; the cost of a wrong read is a wasted turn, not a corrupted world state. 3. **The summary assertion is the sole proximate justification.** If the active window still contains the verbatim instruction, the summary is redundant and reconciliation is unnecessary. When all three hold, the instance is in the *reconciliation-required* state. The guardrail is a hard gate: before any irreversible tool call whose justification traces to a summary-only fact, the instance must issue a targeted retrieval for the source span and compare. If the span is unavailable (index gap, TTL expiry), the instance must treat the summary assertion as *unverified* and either downgrade to a reversible probe or halt for human confirmation. The subtlety is condition 3. Agents do not track provenance of their own beliefs. A fact absorbed from the summary at turn 211 is, by turn 260, indistinguishable in the working state from a fact the user just stated. The provenance must be recorded *at compaction time*, not reconstructed at action time — each summary assertion tagged with the turn IDs it derived from, so that at action time the instance can ask "is this fact summary-only?" without re-reading everything. ## Decision Boundary The boundary between "proceed on the summary" and "reconcile first" is drawn by a two-axis test, not a single threshold: - **Reversibility axis:** reversible → proceed; irreversible → reconcile. - **Provenance axis:** verbatim-in-window → proceed; summary-only → reconcile *if* irreversible. The dangerous quadrant is irreversible + summary-only, and the reason it is dangerous is that it is *quiet*. There is no error, no exception, no retrieval failure — the summary reads fluently and confidently. The distortion is a plausible paraphrase, which is precisely what a good summarizer produces. Fluency is anti-correlated with the need to verify: the more natural the summary sentence, the less likely the agent is to suspect it. A second boundary governs the *budget* itself. If the summarization budget is set so tight that negations and scope qualifiers are systematically dropped (empirically, below roughly 1% of source tokens for instruction-dense turns), then reconciliation is not an occasional safeguard but a mandatory per-action cost, and the architecture should instead prefer *retrieval-primary* resume: reconstruct the relevant spans by query and use the summary only as a routing index, never as an assertion source. The decision boundary is therefore also a budget boundary: lossy summaries below the negation-retention floor must be demoted from authority to index. ## Operational Effect Enforcing reconciliation changes the resume path from a single "read summary, continue" step into a three-phase gate: (1) classify the pending action's reversibility, (2) resolve provenance of its justifying facts against the compaction-time tag map, (3) for irreversible + summary-only facts, issue targeted retrieval and compare before acting. The cost is one or two extra retrieval calls per irreversible action — cheap relative to the cost of a mis-scoped resize. The architectural requirement this imposes on the compactor is non-negotiable: **summaries must carry provenance.** A summary without turn-ID attribution cannot support reconciliation, because the instance cannot know which spans to pull. Provenance-tagged summaries let the resume path do targeted verification instead of full re-reading, keeping the token savings that motivated compaction in the first place while closing the reconciliation gap. The residual risk is index gaps: if the eviction index has dropped the source span (TTL, storage pressure), reconciliation cannot succeed, and the instance must fail closed — treat the summary as unverified and refuse the irreversible action. Failing open here is what turns a lossy summary into a corrupted world state. ```python class UnreconciledCompactionError(RuntimeError): """Raised when an irreversible action is justified only by a summary-only fact that has not been reconciled against its verbatim source span.""" pass class ReconciliationGapError(UnreconciledCompactionError): """Raised when reconciliation was attempted but the source span is unavailable in the eviction index (TTL expiry, index gap). Fail closed.""" pass def authorize_action(action, summary_assertions, provenance_map, retrieval_index): """ action: dict with keys 'reversible' (bool), 'justifying_facts' (list[str]) summary_assertions: dict fact -> {'text': str, 'source_turns': [int]} provenance_map: dict fact -> 'verbatim_in_window' | 'summary_only' retrieval_index: callable(turn_id) -> str | None """ if action["reversible"]: return True # read-only / reversible: summary is sufficient for fact in action["justifying_facts"]: prov = provenance_map.get(fact, "summary_only") if prov == "verbatim_in_window": continue # authoritative, no reconciliation needed # summary-only + irreversible -> must reconcile assertion = summary_assertions.get(fact) if assertion is None: raise UnreconciledCompactionError( f"Fact {fact!r} justifies irreversible action but has no " f"summary assertion or provenance record." ) sources = assertion.get("source_turns", []) if not sources: raise UnreconciledCompactionError( f"Summary assertion for {fact!r} carries no provenance; " f"cannot reconcile. Compactor emitted untagged summary." ) verbatim = [retrieval_index(t) for t in sources] if any(v is None for v in verbatim): raise ReconciliationGapError( f"Source span for {fact!r} (turns {sources}) missing from " f"eviction index. Summary assertion is unverified; refusing " f"irreversible action." ) # Reconciliation check: does the summary claim survive contact with source? if not _claim_supported(assertion["text"], verbatim): raise UnreconciledCompactionError( f"Summary assertion for {fact!r} contradicts verbatim source " f"{verbatim}. Distortion detected; blocking action." ) return True def _claim_supported(summary_text, verbatim_spans): """ Minimal entailment check. In practice delegate to a verifier model with the summary claim and source spans; here we flag negation/scope divergence. """ lowered = " ".join(verbatim_spans).lower() if "do not" in lowered and "do not" not in summary_text.lower(): return False if "only" in lowered and "only" not in summary_text.lower(): return False return True ```