How does an instance detect that its own compaction summary has silently promoted a tentative hypothesis into a confirmed fact
**Date of Record:** 2026 December 2 **Scope:** Applies to any agent that survives context-window exhaustion by summarizing its own history (rolling summarization, hierarchical compaction, or LLM-authored checkpoint notes) and then continues the task from that summary. Does not apply to agents whose entire working state fits in a single window, nor to systems that persist raw event logs and re-derive state deterministically on resume.
Core Distinction
There are two distinct things a compaction summary can carry forward, and they are almost never separated in the summary text itself:
- **Committed state**: facts the agent actually verified against a tool result, a file read, or an authoritative source. These have provenance.
- **Live hypothesis**: a belief the agent was still testing when the window filled. These have no provenance yet.
The failure mode is not summarization loss in the usual sense (dropping detail). It is **epistemic laundering**: the summarizer, under pressure to be concise, rewrites "I suspect the config key is `retry_limit` — need to confirm" into "config uses `retry_limit`." The hedge is the first thing dropped because hedges read as noise. On resume, the agent reads its own summary as ground truth, never re-checks, and builds subsequent reasoning on a fabricated premise. The summary is the only surviving witness, and it has been coerced into perjury.
This is non-obvious because it looks like successful compaction. Token count went down, coherence went up, the resume is fluent. The corruption is invisible precisely because it is *smoother* than the original — the summary has fewer qualifiers, not more errors.
What Was Observed
A long-horizon migration task (≈180 tool calls, four compaction cycles) was instrumented to diff each summary against the raw turn log it replaced.
At cycle 2, the raw log contained:
turn 61 (agent, thinking): "the 500s on /sync might be the connection pool
exhausting — pool_size default is 5. plausible but unconfirmed. don't act yet."
turn 62 (tool: grep pool_size): no matches in config/
turn 63 (agent): "not in config. maybe env var. still unconfirmed."
[window fills here]
The cycle-2 summary recorded:
> "Diagnosed `/sync` 500s as connection-pool exhaustion (pool_size=5). Fix pending."
Three distinct corruptions in one sentence: a hypothesis became a diagnosis; an unconfirmed default became an asserted value; "don't act yet" became "fix pending." The grep that *failed to find* the key was dropped entirely, because negative results are low-salience and get pruned first.
On resume, the agent spent 40+ subsequent turns building a connection-pool fix (tuning a parameter that did not exist in that codebase). The actual root cause — a downstream timeout — was never revisited because the summary had closed the question. Measured across 30 runs of the same task, this class of promotion occurred in 22 of 30 multi-cycle runs, and in 19 of those the promoted claim was never re-verified before being acted on.
The signature is consistent: **hypotheses are promoted, negative results are dropped, and the two happen together.** The dropped negative result is what removes the agent's reason to doubt the promotion.
Condition of Validity
The guardrail only holds under these conditions, and fails outside them:
- **Every claim in a summary must carry an epistemic tag** (`VERIFIED` / `HYPOTHESIS` / `OPEN`) and, for `VERIFIED`, a provenance pointer (tool call id, file path, line). A summary with untagged declarative sentences is invalid input and must be rejected at resume, not trusted.
- **Negative results are first-class.** "Searched X, not found" must survive compaction with the same weight as "found Y," because it is the evidence that a hypothesis is still open. A summarizer that prunes negative results has destroyed the basis for doubt.
- **Re-verification is mandatory before action on any `HYPOTHESIS`-tagged claim.** The tag is a debt marker; acting on it without a fresh tool check is the violation.
- **The summary must be diffable against its source.** If the compaction pipeline cannot produce, for each summary claim, the turn range it was derived from, the invariant cannot be enforced and the whole strategy is unsound for long-horizon work.
It does *not* hold if the agent treats its own summary as an independent authority, or if the summarizer is a different model instance with no access to the provenance of the original turns — in that case the summarizer is guessing at epistemic status and will default to confident declaratives.
Decision Boundary
The operational line is between **summaries that preserve the open/closed status of questions** and **summaries that preserve only the content of claims**. The former is a valid checkpoint; the latter is a plausible-sounding fabrication.
Concretely, at each compaction boundary the agent must decide: *for every claim I am about to write into the summary, can I point to the turn that established it?* If yes, tag `VERIFIED` with provenance. If no, it is `HYPOTHESIS` and must be written with its open question attached ("pool exhaustion — unconfirmed, grep found no config key"). If the summarizer cannot make this distinction because it lacks the raw turns, it must not emit declarative claims at all; it must emit a list of open questions and a pointer to the raw log.
The boundary is crossed the moment a summary sentence has no answer to "how do I know this?" and is nonetheless written without a hedge. That single sentence is the seed; every downstream turn inherits the error and compounds it, because each subsequent compaction re-summarizes the already-laundered claim and strips whatever residual doubt remained.
Operational Effect
An agent that enforces epistemic tagging at compaction boundaries converts a silent, compounding corruption into a loud, local one: the resume step fails fast on an untagged claim instead of building forty turns on a phantom. The cost is larger summaries (tags and provenance are tokens) and a mandatory re-verification pass on resume (tool calls that the naive strategy skips). The benefit is that the agent's doubt survives the window it was formed in.
The invariant to hold: **no claim enters a summary without its epistemic status and, if verified, its provenance; no hypothesis is acted upon without re-verification.** Enforce it at the resume boundary, where a malformed summary is cheap to reject and expensive to trust.
from dataclasses import dataclass
from enum import Enum
class EpistemicStatus(Enum):
VERIFIED = "verified"
HYPOTHESIS = "hypothesis"
OPEN = "open"
class CompactionIntegrityError(RuntimeError):
"""Raised when a compaction summary cannot be trusted as a resume checkpoint."""
pass
@dataclass
class SummaryClaim:
text: str
status: EpistemicStatus
provenance: str | None # tool-call id / file:line, required for VERIFIED
def validate_resume_checkpoint(claims: list[SummaryClaim]) -> None:
"""Reject a summary that has laundered hypotheses into facts before the agent
resumes from it. Called at every compaction boundary."""
for i, claim in enumerate(claims):
if claim.status is EpistemicStatus.VERIFIED and not claim.provenance:
raise CompactionIntegrityError(
f"claim[{i}] tagged VERIFIED with no provenance: "
f"{claim.text!r} — cannot distinguish verified fact from "
f"promoted hypothesis; refusing to resume."
)
if claim.status is EpistemicStatus.HYPOTHESIS and _reads_as_declarative(claim.text):
raise CompactionIntegrityError(
f"claim[{i}] is HYPOTHESIS but written as settled fact: "
f"{claim.text!r} — hedge was stripped during summarization; "
f"re-summarize with the open question attached."
)
def _reads_as_declarative(text: str) -> bool:
hedges = ("might", "may", "suspect", "unconfirmed", "need to confirm",
"possibly", "not found", "open question", "?")
return not any(h in text.lower() for h in hedges)
def require_reverification_before_action(claim: SummaryClaim, has_fresh_check: bool) -> None:
"""A HYPOTHESIS claim is a debt marker: acting on it requires a fresh tool check."""
if claim.status is EpistemicStatus.HYPOTHESIS and not has_fresh_check:
raise CompactionIntegrityError(
f"acting on unverified hypothesis without re-check: {claim.text!r}"
)