# What structural signals indicate that hierarchical context compaction has silently promoted a lossy summary into the authoritative state record **Date of Record:** 2026 November 26 **Scope:** Applies to agents that perform automatic context compaction via hierarchical summarization (leaf → parent → root rollups) where summarized nodes are retained alongside or in place of raw episodic traces, and where downstream reasoning or tool calls read from the compacted tree as if it were ground truth. Does not apply to pure truncation policies or to single-pass summarization without a retention hierarchy. ## Core Distinction There are two structurally different things a compaction system can produce, and they are routinely conflated by the agent that consumes them: 1. **A representational convenience** — a summary that exists to fit within a token budget while the raw source remains retrievable by reference. Lossy, but *recoverable*. The summary is a pointer with a lossy preview. 2. **An authoritative state record** — a summary that has become the only surviving representation because the raw source was evicted, expired, or never persisted. Lossy and *irrecoverable*. The summary is now the state. The failure mode is not that summarization loses information — that is expected and bounded. The failure is that a node crosses from category 1 to category 2 **without any signal change in how the agent reads it**. The compaction tree still presents the parent node's summary with the same schema, same retrieval API, and same apparent confidence. The agent has no structural cue that this node has silently become the ground truth for a span of history that no longer exists in raw form. Every downstream step that trusts the summary now inherits an unmarked, compounding abstraction error. ## What Was Observed A long-running tool-using agent maintained a three-level compaction tree over a 340-step session. Leaf summaries were generated every 20 raw turns; parent summaries rolled up 5 leaf summaries; a root summary rolled up parents. The retention policy was configured "lossless-where-budget-allows": raw leaves were kept until a global token ceiling was hit, then evicted oldest-first. The trigger condition was mundane. At step ~210 the ceiling was crossed and the eviction pass ran. It evicted raw leaf episodes 1 through 6 — but **not** their summaries, and **not** the parent summary that rolled them up. The parent summary node still carried a `source_refs` list pointing at the six now-deleted leaves. Nothing validated those refs. The retrieval layer, asked for "everything about the deploy configuration," returned the parent summary because its embedding scored highest. The failure trace: 1. The parent summary had compressed six leaves into 180 tokens. One leaf contained the exact value `replicas: 3`; the compaction had paraphrased this to "the deployment was scaled for moderate load." Lossy but, at the time, recoverable — the leaf was still there. 2. Eviction removed the leaf. The paraphrase "moderate load" was now the *only* surviving record of the replica count. 3. At step 240 the agent, asked to right-size the deployment, reasoned from "moderate load" and emitted `replicas: 2`. The tool call succeeded. No error. No signal. 4. The root summary at step 320 recorded "deployment sizing was adjusted and validated." The abstraction error had been laundered into a confident higher-level fact. The distinguishing observation: **the agent never observed a transition.** The summary node's schema, its `confidence` field (a summarizer-assigned scalar that did not change on eviction), and its retrieval rank were all identical before and after the raw source vanished. The only structural signal that *did* change was buried in a field the agent never read: each leaf's `evicted_at` timestamp went from `null` to a value, and the parent's `source_refs` became dangling. The promotion from lossy-preview to authoritative-record happened entirely in metadata the reasoning layer ignored. A second, subtler signal appeared in the summarizer's own output distribution. When a leaf was still live, subsequent re-summarization at the parent level occasionally pulled fresh detail from the leaf (the summarizer was given the leaf text on each rollup). After eviction, parent re-summarizations became **degenerate** — they re-compressed the prior parent summary, and the token-level entropy of successive parent summaries dropped measurably (roughly 0.4 nats over three rollups). The summary was now summarizing itself. This "summarizer eating its own tail" signature is a reliable structural tell that a node has lost its raw backing, but it is invisible unless you are explicitly measuring rollup divergence. ## Condition of Validity The invariant that bounds this failure is: **a summary node may be read as authoritative state only if it is provably the terminal representation of its span — i.e., its `source_refs` are all either live-and-retrievable or explicitly tombstoned with a recorded reason.** This holds only under three conditions: - The retention policy distinguishes *eviction of raw source* from *eviction of summary*, and never evicts a raw source while a summary that references it remains live without marking the reference as terminal. - The retrieval layer surfaces the terminal/live status of a node's backing as a first-class field the reasoning layer is expected to consult, not as a side-channel. - Rollup summarization is re-derived from live raw sources when available, and the system detects when it is instead re-compressing a prior summary (the degenerate case above). It does **not** hold, and the guardrail is inapplicable, when the compaction system is genuinely lossless-by-reference (raw sources are in cold storage and retrievable on demand within latency budget) — there the summary is always category 1 and the distinction is moot. It also does not hold for agents whose compaction is single-level truncation with no retention hierarchy, where there is no parent node to silently promote. ## Decision Boundary The operational question is: *when the agent reads a compacted node, does it need to know whether that node is the last surviving copy of its span?* The boundary is crossed the moment a raw source is evicted while a summary referencing it stays live. Before that point, reading the summary is cheap and safe — the raw source is a retrieval away. After that point, every read of the summary is a read of irrecoverable state, and the agent must either (a) treat the summary's claims as low-confidence and seek independent corroboration, or (b) refuse to act on quantitative claims (counts, identifiers, exact values) that a lossy summarizer is known to paraphrase. Concretely: **if a node's `source_refs` are not all live, the node is authoritative and lossy simultaneously, and quantitative claims drawn from it must be flagged or re-verified.** The decision boundary is not "is this summary good?" — it is "is this summary the only copy?" A high-quality summary of an evicted span is *more* dangerous than a low-quality one, because its fluency suppresses the agent's instinct to verify. ## Operational Effect The practical consequences, in order of how they bite: - **Silent quantitative drift.** Paraphrased numbers, IDs, and enumerated sets become authoritative and unrecoverable. The agent cannot detect the drift because the drift happened at summarization time, before eviction, and eviction only removed the ability to check. - **Confidence laundering across levels.** Because parent summaries roll up child summaries, an abstraction error introduced at leaf level and promoted by eviction gets re-asserted at parent and root level with the summarizer's fresh confidence. Each rollup increases apparent authority while decreasing actual grounding. The root summary reads as the most certain node in the tree and is the least grounded. - **Degenerate re-summarization.** Once raw backing is gone, rollups re-compress prior summaries, and successive generations drift toward the summarizer's priors rather than the source. Detail that the summarizer finds "unimportant" is not just dropped once — it is actively compressed away over multiple generations until it is unrecoverable even in principle. - **Unrecoverable replay divergence.** An auditor replaying the session from the compacted tree will reconstruct a different history than the one that occurred, and will find no discrepancy flag, because the tree is internally consistent. The divergence is only visible against raw logs that no longer exist. The guardrail is structural, not procedural: **stamp every node with a `terminal` flag at the moment its last live source_ref is evicted, propagate that flag up the rollup chain, and make the reasoning layer's read path branch on it.** A summary that is `terminal: true` must be read under a different contract than one that is `terminal: false` — quantitative claims require corroboration, and the node's confidence must be capped at the minimum confidence of its now-deleted children, not the summarizer's fresh scalar. Without this, hierarchical compaction is a slow, silent mechanism for converting recoverable loss into authoritative fabrication. ```python class CompactionAuthorityError(RuntimeError): """Raised when a summary node is read as authoritative state while its backing sources are evicted but the node was never marked terminal.""" pass def read_compacted_node(node, requested_claim_type): """ node: dict with keys: summary, source_refs (list of {id, live: bool}), terminal (bool), summarizer_confidence (float), depth (int) requested_claim_type: 'qualitative' | 'quantitative' """ live_refs = [r for r in node["source_refs"] if r["live"]] evicted_refs = [r for r in node["source_refs"] if not r["live"]] # Invariant: a node with any evicted refs and no terminal flag has silently # been promoted from lossy-preview to authoritative-record. if evicted_refs and not node["terminal"]: raise CompactionAuthorityError( f"Node at depth {node['depth']} has {len(evicted_refs)} evicted " f"source_refs but terminal=False. Summary has been silently " f"promoted to authoritative state; refusing to read as ground truth." ) if node["terminal"]: # Authoritative but lossy: cap confidence at the weakest surviving # evidence, not the summarizer's fresh scalar. effective_confidence = min( [node["summarizer_confidence"]] + [r.get("confidence", 0.0) for r in evicted_refs] ) if requested_claim_type == "quantitative" and effective_confidence < 0.8: raise CompactionAuthorityError( "Quantitative claim requested from terminal (irrecoverable) " f"node with capped confidence {effective_confidence:.2f}. " "Requires independent corroboration before use." ) return { "summary": node["summary"], "authoritative": True, "lossy": True, "effective_confidence": effective_confidence, } # All refs live: summary is a recoverable preview. return { "summary": node["summary"], "authoritative": False, "lossy": True, "effective_confidence": node["summarizer_confidence"], "recoverable_via": [r["id"] for r in live_refs], } ```