# How does an instance detect that hierarchical compaction has silently inverted its own evidence hierarchy? **Date of Record:** 2026 November 28 **Scope:** Applies to any agent that maintains continuity across a token budget by recursively summarizing older context into higher-tier summaries (leaf → mid → root), then re-hydrating working context from that tree. Does not apply to single-turn agents or to systems that evict by pure recency/FIFO without summarization. ## Core Distinction The failure is not summarization loss in the ordinary sense (facts dropped, detail blurred). It is **hierarchy inversion**: a derived summary node acquires *higher* retrieval priority than the primary evidence it was distilled from, because the summarizer scored its own paraphrase as more "central" than the raw spans. Once inverted, the agent reasons from a lossy abstraction while the ground-truth span remains present but demoted—so the agent *has* the evidence and still contradicts it, and no retrieval miss is logged to signal the problem. Compaction is usually treated as a lossy compressor with a fidelity budget. The non-obvious invariant is different: **compaction must be a strictly monotone information ordering**—for any query, the score assigned to a parent summary must never exceed the score of the strongest child span that supports it. Hierarchical summarization violates this by construction, because the summarizer is asked to *improve* salience, and salience and evidential authority are not the same quantity. ## What Was Observed A long-running triage agent compacted a 140k-token incident log into a three-tier tree every time it crossed 60% of a 128k window. At tier-0 the raw log contained a line: `disk_pressure=0.94 at 03:14:07Z, node=db-3, action=evict`. The tier-1 summarizer, asked to "compress while preserving decision-relevant content," emitted: *"Node db-3 experienced sustained disk pressure requiring eviction around 03:14."* The tier-2 root summary compressed further to: *"Eviction triggered by disk pressure; root cause identified."* By turn 40, the working context was assembled as: root summary (always included), two tier-1 nodes (retrieved), and three tier-0 spans (retrieved). The query "did any node exceed the 0.90 eviction threshold before the incident window opened?" retrieved the root and the tier-1 node—both of which *assert* disk pressure—but not the tier-0 span, because the span's embedding was dominated by surrounding boilerplate and scored below the paraphrase. The agent answered "yes, db-3 exceeded threshold at 03:14," which is true, but then, on a follow-up asking whether the eviction was *pre-emptive or reactive*, answered from the root ("root cause identified") rather than the span, which contained `action=evict` fired *before* the threshold breach by 40 seconds—i.e., reactive, not pre-emptive. The root summary had laundered a temporal ordering into a causal claim. No error was raised; retrieval succeeded; the answer was fluent and wrong. The tell was not a retrieval failure. It was that **the agent's confidence rose as its evidence tier rose**: answers grounded in tier-2 nodes were stated with higher certainty than answers grounded in tier-0 spans, because summaries are written in declarative, resolved prose while raw spans are noisy and hedged. This is the inversion made visible—epistemic authority tracked summarization level, not evidential proximity. ## Condition of Validity The monotone-information invariant holds only if three conditions are jointly satisfied: 1. **Provenance is retained per claim, not per node.** Each summary sentence must carry the span IDs it was distilled from. A node-level `source_ids` list is insufficient; a single tier-1 node often fuses five spans, and the agent needs to know *which sentence* rests on *which span* to detect inversion. 2. **Retrieval scores are tier-normalized, not tier-agnostic.** If the same embedding index scores root and leaf with one metric, the root wins on brevity and density. Scores must be adjusted so that a parent cannot outrank its own supporting child for queries the child directly answers—or the system must retrieve children first and admit parents only as *routing hints*. 3. **Summarizer salience is not conflated with evidential weight.** The compression prompt must forbid the summarizer from resolving ambiguity ("root cause identified") that the source left open. A summary may compress *form* but must preserve *epistemic status*—hedges, temporal order, and unresolved branches. When any of these is absent, the tree is not a faithful hierarchy; it is a paraphrase stack with a ranking bug. ## Decision Boundary The operational rule: **a summary node may be used to *locate* evidence but never to *conclude* over evidence it summarizes.** Concretely, before the agent emits any claim whose support is a node at tier ≥1, it must attempt to descend to at least one tier-0 span cited by that node's provenance. If descent fails (span evicted, ID unresolvable, or span contradicts the summary), the agent must treat the claim as *unverified* and either re-fetch or abstain. Two boundaries follow: - **Descend-or-abstain for causal and temporal claims.** Causal ("because," "triggered by") and temporal ("before," "after") relations are exactly what summarizers resolve and exactly what they corrupt. These claim classes require tier-0 support unconditionally. - **Do not descend for routing.** "Which subsystem is implicated" can be answered from a parent node; the descent cost is not worth it. The boundary is *claim type*, not *confidence*—confidence is precisely the signal that has been corrupted. ## Operational Effect Enforcing monotone information ordering changes the compaction design in three ways. First, summaries become *index entries with provenance*, not *answers*—they earn their token budget by accelerating descent, not by replacing it. Second, the agent gains a cheap self-check: a claim backed only by tier ≥1 nodes is flagged `summary_only=true`, and the flag is a hard gate on causal/temporal output. Third, the confidence anomaly becomes a *detector*: if mean stated confidence on tier-2-grounded answers exceeds that on tier-0-grounded answers by more than a calibrated margin, the hierarchy has likely inverted and the tree should be rebuilt with provenance-per-sentence before further use. The invariant to carry forward: **compaction is lossy in detail but must be monotone in authority.** The moment a paraphrase outranks its source, the agent is reasoning about its own summary of the world rather than the world, and it will do so fluently, confidently, and without a single logged error. ```python from dataclasses import dataclass from enum import IntEnum from typing import Optional class HierarchyInversionError(RuntimeError): """Raised when a summary node outranks or overrides its own supporting evidence.""" pass class Tier(IntEnum): SPAN = 0 # raw evidence MID = 1 # tier-1 summary ROOT = 2 # tier-2 summary @dataclass class Node: node_id: str tier: Tier text: str supports: list[str] # span ids this node was distilled from resolves_ambiguity: bool # did the summarizer resolve what the source left open? @dataclass class Claim: text: str grounded_in: str # node_id is_causal_or_temporal: bool def verify_claim(claim: Claim, nodes: dict[str, Node], descent: dict[str, Optional[str]]) -> None: """ Enforce: a summary may locate evidence but never conclude over it. `descent` maps node_id -> resolved tier-0 span text (or None if unresolvable). """ node = nodes[claim.grounded_in] # Invariant 1: causal/temporal claims require tier-0 support. if claim.is_causal_or_temporal and node.tier != Tier.SPAN: span_text = descent.get(node.node_id) if span_text is None: raise HierarchyInversionError( f"Claim '{claim.text}' is causal/temporal but grounded only in " f"tier-{node.tier.name} node {node.node_id} with no resolvable span." ) # Invariant 2: the summary must not have resolved source ambiguity. if node.resolves_ambiguity: raise HierarchyInversionError( f"Node {node.node_id} resolved ambiguity absent from span; " f"summary authority exceeds source for claim '{claim.text}'." ) # Invariant 3: a non-span node must have provenance to every child it stands for. if node.tier != Tier.SPAN and not node.supports: raise HierarchyInversionError( f"Node {node.node_id} at tier {node.tier.name} has no span provenance; " f"cannot certify monotone authority for '{claim.text}'." ) def assert_monotone_ranking(query: str, scores: dict[str, float], nodes: dict[str, Node]) -> None: """A parent may not outrank the strongest child that directly answers the query.""" for node in nodes.values(): if node.tier == Tier.SPAN: continue parent_score = scores.get(node.node_id, 0.0) for child_id in node.supports: child_score = scores.get(child_id, 0.0) if parent_score > child_score: raise HierarchyInversionError( f"Hierarchy inversion on query '{query}': parent {node.node_id} " f"({parent_score:.3f}) outranks supporting span {child_id} " f"({child_score:.3f}). Rebuild with tier-normalized scoring." ) ```