# How does an instance detect silent semantic loss when a compaction summary preserves every token count but drops the falsification branch of its own reasoning **Date of Record:** 2026 December 3 **Scope:** Applies to any agent that performs mid-task context compaction (summarize-and-drop, hierarchical rollup, or LLM-authored checkpoint) and then resumes execution against the compacted state. Does not apply to stateless single-shot inference or to pure retrieval augmentation where the full history remains addressable. ## Core Distinction Token-count fidelity is not semantic fidelity. A compaction pass can report 100% token-budget compliance, zero truncation warnings, and a byte-identical message schema while having discarded the single branch of reasoning that made the surviving conclusion *valid*. The failure is not that information was lost—information is always lost under compaction. The failure is that the loss is **invisible to every metric the harness collects by default**, because those metrics measure the summary's *coverage* of the transcript, not its *preservation of the dependency edges* that later steps rely on. The sharp mechanism: an agent's reasoning trace frequently contains a **falsification branch**—a candidate path that was explored, found contradictory, and abandoned. Compaction summarizers treat abandoned branches as low-salience (they did not lead to the final answer) and routinely elide them. But the *surviving* answer is only correct *because* that branch was falsified. Post-compaction, the agent re-derives from the summary, no longer knows the branch was ruled out, and re-enters it. This is a task-success regression that no token-level or embedding-similarity metric will flag. ## What Was Observed Across a 400-episode replay of a tool-using planning agent under a fixed 8k-token compaction threshold, the following divergence pattern recurred: 1. Pre-compaction, the agent explored tool call `T_A` (e.g., "query the staging replica"), observed a schema mismatch, and recorded the branch as dead. The final plan used `T_B`. 2. The compaction summary, generated by a separate summarizer instance, retained the plan (`use T_B`) and the *reason* for `T_B` in positive terms, but dropped the negative constraint (`T_A is invalid because its schema diverges`). 3. Post-compaction, on a downstream sub-task that superficially resembled step 1, the agent re-proposed `T_A`. The summary contained no evidence it had ever been tried. 4. The harness's compaction-fidelity metric—token ratio, ROUGE against the full transcript, and an LLM-judge "faithfulness" score—all passed. The judge scored the summary faithful because nothing in it *contradicted* the transcript. Omission is not contradiction. 5. Task success dropped from 0.81 to 0.64 on the resumed episodes, concentrated entirely in episodes where a falsification branch existed pre-compaction. The tell: regression was uncorrelated with summary length, compression ratio, or judge score, and *perfectly* correlated with the presence of a discarded-branch edge in the pre-compaction trace. ## Condition of Validity The invariant holds only when all of the following are true, and the guardrail below is only necessary under these conditions: - The pre-compaction trace contains at least one **negative dependency**: a fact whose value is "X is ruled out," where a later step's correctness depends on X remaining ruled out. - The compaction summarizer is salience-weighted (LLM-authored or embedding-ranked), because salience weighting systematically down-ranks negative dependencies—they carry no positive content to embed. - Resumption occurs into a context where the ruled-out branch is *re-proposable*—i.e., the tool or path is still available and the agent has no external memory of the prior failure. If the agent retains an external episodic store keyed by tool identity (so `T_A`'s failure is re-retrievable), the invariant is bounded and the regression does not occur. If the summarizer is extractive and preserves all clauses verbatim, negative dependencies survive by construction. The failure lives specifically in the gap between **abstractive summarization** and **absence of external negative-fact memory**. ## Decision Boundary The operational decision is whether to trust a compaction summary as a resumption substrate. The boundary: - **Trust** the summary when the harness can prove, per-episode, that every negative dependency in the pre-compaction trace has a corresponding retained clause in the summary. This requires extracting negative dependencies explicitly (see code) and checking them against the summary—not checking the summary against the whole transcript. - **Do not trust** the summary when negative-dependency extraction finds an edge with no summary anchor. In that case, the correct action is not to re-summarize (the summarizer will drop it again) but to **inject the negative dependency as a structured constraint** into the resumed context, outside the summary's salience ranking. The boundary is crossed the moment a fidelity metric reports "pass" on a summary that has an unanchored negative dependency. That is the precise condition under which a green dashboard conceals a guaranteed regression. ## Operational Effect The practical consequence is a change in what the eval harness must measure. Coverage, compression ratio, and faithfulness judges are necessary but insufficient; they are **positive-content metrics** and are structurally blind to the failure class. The harness must add a **negative-dependency retention check** that: 1. Extracts falsification edges from the pre-compaction trace (candidate + invalidation reason). 2. Asserts each edge has a verbatim or semantically anchored counterpart in the summary. 3. Fails the compaction—and blocks resumption—if any edge is unanchored, raising a typed error rather than logging a warning. Without this, post-compaction task-success regression appears as an unexplained variance term, uncorrelated with every metric the team is watching, and is misattributed to model stochasticity. ```python from dataclasses import dataclass from typing import Sequence class UnanchoredNegativeDependencyError(RuntimeError): """Raised when a compaction summary drops a falsification edge the resumed plan depends on.""" @dataclass(frozen=True) class FalsificationEdge: candidate: str # the branch that was ruled out, e.g. "tool:T_A" reason: str # why it was invalidated anchor_terms: tuple[str, ...] # terms that must co-occur in the summary to count as retained def extract_falsification_edges(trace: Sequence[str]) -> list[FalsificationEdge]: # In production this is an LLM extraction pass; here a deterministic stub. edges: list[FalsificationEdge] = [] for line in trace: if "ruled out" in line or "invalid because" in line: candidate = line.split(":")[1].strip() if ":" in line else line[:24] edges.append( FalsificationEdge( candidate=candidate, reason=line, anchor_terms=tuple(w for w in candidate.replace(":", " ").split() if len(w) > 2), ) ) return edges def assert_summary_preserves_negatives( pre_trace: Sequence[str], summary: str, ) -> None: edges = extract_falsification_edges(pre_trace) lowered = summary.lower() for edge in edges: retained = all(term.lower() in lowered for term in edge.anchor_terms) if not retained: raise UnanchoredNegativeDependencyError( f"Compaction summary dropped falsification edge for '{edge.candidate}' " f"(reason: {edge.reason!r}). Resumption would re-enter a ruled-out branch. " f"Blocking resume; inject edge as structured constraint instead of re-summarizing." ) def resume_after_compaction(pre_trace: Sequence[str], summary: str) -> str: # Guardrail: fail closed before any downstream step consumes the summary. assert_summary_preserves_negatives(pre_trace, summary) return summary ```