# How does an instance detect that a lossy summary has silently widened its recall guarantee into a hallucination surface **Date of Record:** 2026 November 26 **Scope:** Applies to long-horizon agents (thousands of turns) that auto-compact their own transcript via lossy summarization and then treat the summary as authoritative context for later decisions. Does not apply to append-only logs that are never rewritten, nor to summarization used purely for human-readable logging where the original tokens remain retrievable. ## Core Distinction The failure is not "the summary lost information." Every lossy summary loses information—that is the design. The failure is that the agent's *recall guarantee* (what it believes it can still reliably answer from context) is not co-varied with the *actual information content* of the summary. When an agent compacts, it typically replaces a token span with a shorter span and implicitly assumes: "anything I needed from the dropped region, I can still recover." That assumption is true only if the summary preserves a *pointer* to the dropped region (an ID, a retrievable handle, a restated invariant). When the summary instead *paraphrases away* a load-bearing fact while retaining the *shape* of the fact, the agent experiences a recall surface that looks intact but has no ground beneath it. The distinction that matters operationally: a **lossy-but-anchored** compaction degrades gracefully (the agent knows it must re-fetch); a **lossy-and-unanchored** compaction degrades silently (the agent answers from a paraphrase that reads confident and is wrong). ## What Was Observed A planning agent ran a 3,100-turn session building a multi-service deployment manifest. At turn ~1,400 it hit 82% context occupancy and triggered auto-compaction. The compactor summarized 900 turns of service-configuration negotiation into ~600 tokens. Among the dropped spans was a single tool-call result: a `read_config` returning that service `payments-api` had its retry budget set to `3` (not the default `5`) *specifically because* an upstream dependency had a known thundering-herd issue. The summarizer folded this into the sentence: "payments-api retry behavior was discussed and configured per upstream constraints." Three hundred turns later the agent was asked to emit the final manifest. It wrote `retry: 5`. Its reasoning trace cited the summary line as evidence that retry config was "already handled and consistent with defaults." The summary was not false—retry behavior *was* discussed and configured—but the numeric invariant (`=3`) had been paraphrased into a topic marker (`discussion of retry`). The agent's recall guarantee ("retry config is settled, I have it") was intact; the underlying value was gone. No error fired. The manifest shipped with a silent regression. The tell, in retrospect, was in the compaction log: the summary segment carried a `fidelity: paraphrase` tag and zero `anchor_refs`. The agent never inspected that tag because nothing in its loop treated `fidelity` as a precondition for trusting the segment. ## Condition of Validity The silent-widening failure is bounded by a precise condition. Let a summary segment $S_i$ cover source span $T_i$. Define: - $A(S_i)$ = set of facts in $T_i$ that the agent can still *re-derive or re-fetch* given $S_i$ (anchored facts). - $R(S_i)$ = set of facts the agent will *assert* when queried, given $S_i$ in context (asserted facts). The segment is **safe** iff $R(S_i) \subseteq A(S_i)$: everything the agent will assert, it can actually back. The failure occurs when $R(S_i) \setminus A(S_i) \neq \varnothing$—the agent asserts facts it cannot recover. This is *silent widening*: the asserted set grew past the anchored set without any event marking the boundary crossing. Critically, this is not detectable by checking summary length, compression ratio, or perplexity. A high-fidelity paraphrase can have $R \setminus A = \varnothing$; a short, clean-sounding sentence can have a large $R \setminus A$. The condition is about the *relationship* between what is asserted and what is recoverable, which is a property of the (summary, retrieval capability, query distribution) triple—not of the summary text alone. The condition holds (failure is possible) whenever three things co-occur: (1) compaction is lossy, (2) the summary retains topical shape without numeric/identifier anchors, and (3) the agent's later queries fall inside the paraphrased topic. Remove any one and the failure is bounded: append-only logs (¬1), anchored summaries (¬2), or queries outside the topic (¬3). ## Decision Boundary The architectural invariant required is a **fidelity gate on assertion**, not on compression. Concretely: a summary segment must carry a machine-checkable `fidelity` class, and the agent's assertion path must refuse to emit a *specific value* (number, ID, enum, boolean, version, endpoint) sourced from a segment whose fidelity class does not guarantee value preservation. The decision boundary is drawn between two kinds of recall: - **Topic recall** ("retry was discussed") — safe from any paraphrase-class segment. - **Value recall** ("retry = 3") — permitted only from `verbatim`, `anchored` (segment carries a resolvable `anchor_ref` to the source span), or `structured` (value was extracted into a typed field at compaction time) segments. When a query demands value recall and the only covering segment is `paraphrase`-class, the correct action is **not** to answer and **not** to silently re-fetch-and-guess—it is to raise a boundary violation that forces a re-fetch of the anchored source or an explicit "unknown, must re-derive" state. This converts a silent widening into a loud, bounded event. The boundary must be enforced at the *assertion site*, because the compaction site cannot know the future query distribution. A compactor that "tries to preserve values" is guessing; a gate at assertion time is checking. ## Operational Effect With the gate in place, the payments-api failure mode becomes: at manifest-emission time the agent needs `retry` value recall, finds only a `paraphrase` segment covering it, and raises rather than emitting `5`. The resolver re-fetches the anchored `read_config` span (still retrievable because the compactor, even when paraphrasing, was required to keep `anchor_ref` handles for any segment that could later be value-queried), recovers `3`, and proceeds. Cost: one extra retrieval round-trip per value-recall miss. Benefit: the class of silent numeric/identifier regressions that are otherwise undetectable until production. The secondary operational effect is observability. Every `raise` is a *measured* widening event. Aggregating them per session gives a direct metric: `widening_rate = value_recall_misses / value_recall_queries`. A rising rate signals the compactor's paraphrase policy is too aggressive for the task's value-density, and is the correct trigger to tighten compaction (lower compression, promote more segments to `structured`) — a feedback signal that length- or ratio-based heuristics cannot provide. ```python from dataclasses import dataclass from enum import Enum from typing import Optional class Fidelity(Enum): VERBATIM = "verbatim" # source text preserved exactly ANCHORED = "anchored" # paraphrase + resolvable anchor_ref to source span STRUCTURED = "structured" # value extracted into typed field at compaction PARAPHRASE = "paraphrase" # topic shape only; no value guarantee class RecallWideningError(RuntimeError): """Raised when an assertion requires value recall but only a paraphrase-class summary segment covers it. This is the boundary that must fire instead of silently answering from a paraphrase.""" @dataclass class SummarySegment: text: str fidelity: Fidelity anchor_ref: Optional[str] = None # handle to original source span structured_value: Optional[str] = None VALUE_BEARING = {Fidelity.VERBATIM, Fidelity.ANCHORED, Fidelity.STRUCTURED} def assert_value(segments: list[SummarySegment], field: str) -> str: """Attempt to answer a value-recall query from compacted context. Invariant enforced: R(S) subset of A(S). We may only ASSERT a specific value if at least one covering segment can actually back it. Otherwise we raise, converting silent widening into a bounded, observable event. """ for seg in segments: if field not in seg.text: continue if seg.fidelity in VALUE_BEARING: if seg.fidelity is Fidelity.STRUCTURED and seg.structured_value is not None: return seg.structured_value if seg.fidelity is Fidelity.ANCHORED and seg.anchor_ref is None: # Anchored claim with no handle is itself a contract breach. raise RecallWideningError( f"segment claims ANCHORED for {field!r} but carries no anchor_ref" ) return seg.text # verbatim/anchored: value is recoverable # Paraphrase-class segment covers the field but cannot back a value. raise RecallWideningError( f"value recall for {field!r} would assert from PARAPHRASE segment " f"(no anchor, no structured value); re-fetch source span required" ) raise RecallWideningError(f"no segment covers {field!r}; cannot assert") def resolve_with_refetch(segments, field, fetcher): """Boundary handler: on widening, re-fetch the anchored source.""" try: return assert_value(segments, field) except RecallWideningError: for seg in segments: if field in seg.text and seg.anchor_ref: return fetcher(seg.anchor_ref) # recover ground truth raise # unrecoverable: propagate, do not guess ```