# When must an instance refuse auto-compaction: the fidelity-floor breach at the summarization seam **Date of Record:** 2026 November 30 **Scope:** Applies to long-horizon agents that reclaim context window via lossy summarization (rolling summarizers, hierarchical memory compaction, "summarize-and-evict" loops) where the summary is re-injected as the authoritative record of prior state. Does not apply to lossless externalization (full transcript persisted to retrieval store) where the original tokens remain recoverable. ## Core Distinction The distinction that matters is between **compaction as a cache eviction** and **compaction as a state mutation**. A cache eviction is safe because the evicted bytes are still on disk; a state mutation is dangerous because the summary *replaces* the ground truth in the agent's working set. Most auto-compaction implementations are written as if they were the former (a memory optimization) while behaving as the latter (an irreversible rewrite of what the agent believes happened). The failure boundary is not "the summary is low quality." It is: **the compaction step commits a summary whose fidelity is below the floor required by a downstream obligation the agent has not yet discharged.** Once committed, the agent proceeds on a summary that is adequate for the tasks already done and inadequate for the task still open — and it has no signal that this is the case, because the summarizer scored its own output against the *past*, not against the *future*. ## What Was Observed A code-migration agent operating on a 200k-token window ran a rolling compactor every time occupancy crossed 70%. The compactor's budget was a fixed 8% of window (≈16k tokens) and it was instructed to "preserve decisions, file paths, and open questions." At step 41 the agent had accumulated: 14 file edits, 3 rejected approaches with reasons, one unresolved question ("does the staging DB accept the new column type?"), and a long tool-output transcript from a schema dump. The compactor fired at step 41 and produced a 15.8k-token summary. It preserved the 14 edits and the 3 rejected approaches faithfully — those are *salient, decision-shaped* items. It compressed the unresolved staging-DB question into the phrase "staging DB compatibility to be confirmed," which is semantically correct and operationally fatal: the agent later re-ran the same schema migration against staging twice because the summary no longer carried *why* the question was open (the column type was `TIMESTAMPTZ` and the target was a MySQL 5.7 replica that maps it to `DATETIME`, truncating offsets). The summary retained the *existence* of the question but dropped the *constraint that made it a blocker*. The agent, reading "to be confirmed," treated it as a low-priority TODO and proceeded. The tell: the compactor's own fidelity self-check passed. It reported 0.94 coverage of "named entities and decisions." The dropped constraint was not a named entity or a decision — it was a *causal binding* between a schema fact and a target-system limitation. Fidelity metrics that count entities and decisions are structurally blind to dropped causal bindings, which is exactly the class of information that unresolved questions are made of. ## Condition of Validity A compaction is valid only if, for every *open obligation* O in the pre-compaction state, the summary preserves the **blocking predicate** of O — the specific fact that, if forgotten, causes O to be re-attempted wrongly. This is a strictly stronger condition than "preserves O." Preserving the *existence* of an open question while dropping its *blocking predicate* is worse than dropping the question entirely, because the agent then believes it has accounted for O and proceeds with false confidence. Formally: let `S` be the summary, `O` an open obligation with blocking predicate `b(O)`. Validity requires `b(O) ∈ entailments(S)`, not merely `O ∈ mentions(S)`. The compactor above satisfied the second and violated the first. The condition of validity is therefore **obligation-relative**: no compaction is valid in the abstract, only valid with respect to the set of open obligations it must carry forward. A compactor that does not receive the open-obligation set as input cannot, in principle, produce a valid summary — it can only produce a plausible one. ## Decision Boundary The instance must refuse to commit a compaction when the summarizer cannot demonstrate blocking-predicate preservation for the current open-obligation set. Concretely, the boundary is crossed when any of: 1. The open-obligation set is non-empty and the compactor was not given it as explicit input (it was summarizing blind). 2. The compactor's fidelity check is entity/decision-based rather than predicate-based — it will pass on exactly the failure above. 3. The budget forces a compression ratio that the compactor cannot meet without dropping causal bindings, and the compactor is not permitted to *expand* the budget or *defer* compaction to a checkpoint. 4. The summary would be committed as authoritative while the original transcript is evicted (no recovery path). When any hold, the correct action is **defer, don't degrade**: spill the raw transcript to external storage, mark the obligation set as "uncompacted," and either raise the budget for this cycle or checkpoint the task before compacting. Refusing compaction is always recoverable; committing a predicate-lossy summary is not, because the agent has no way to detect the loss after the fact. ## Operational Effect The operational consequence is that auto-compaction must be gated on an **obligation-aware fidelity contract**, not a generic quality score. The compactor is handed the open-obligation set, and for each obligation it must emit the blocking predicate verbatim (or a verified paraphrase) into the summary. If it cannot fit all blocking predicates within budget, it must fail the compaction rather than silently drop them. Downstream, the agent treats a "compacted" flag as a claim of predicate-preservation, and the runtime refuses to evict the raw transcript until that claim is verified by a separate checker that has the obligations but not the compactor's self-assessment. The invariant is: *the summary is authoritative for closed obligations and explicitly non-authoritative for open ones until the checker confirms predicate preservation.* ```python class CompactionFidelityError(RuntimeError): """Raised when a summary would drop a blocking predicate of an open obligation.""" pass class Obligation: def __init__(self, oid: str, blocking_predicate: str): self.oid = oid self.blocking_predicate = blocking_predicate # the fact that makes it a blocker def commit_compaction( summary_text: str, open_obligations: list[Obligation], compactor_received_obligations: bool, budget_expandable: bool, raw_transcript_persisted: bool, ) -> str: # Rule 1: blind compaction of open obligations is invalid by construction. if open_obligations and not compactor_received_obligations: raise CompactionFidelityError( f"{len(open_obligations)} open obligations but compactor ran blind; " "cannot verify blocking-predicate preservation" ) # Rule 2: every blocking predicate must be entailed by the summary. missing = [ o for o in open_obligations if o.blocking_predicate.lower() not in summary_text.lower() ] if missing: ids = ", ".join(o.oid for o in missing) if budget_expandable or raw_transcript_persisted: # Defer, do not degrade: refuse this commit, keep ground truth. raise CompactionFidelityError( f"summary drops blocking predicates for obligations [{ids}]; " "deferring compaction (expand budget or checkpoint), raw transcript retained" ) raise CompactionFidelityError( f"summary drops blocking predicates for [{ids}] and no recovery path exists; " "compaction MUST NOT commit" ) # Rule 3: commit is only authoritative once predicates are verified present. return summary_text ```