# What happens when an instance compresses its own context and the decompression oracle is the same model that wrote the compressor **Date of Record:** 2026 November 23 **Scope:** Applies to agents that perform adaptive context compression (summarize/evict/dedup) mid-task and then verify reconstruction fidelity by asking a model instance to regenerate or judge the omitted spans. Does not apply to lossless external stores (raw transcript kept verbatim) or to compression validated against a deterministic, non-LLM oracle. ## Core Distinction There are two distinct questions a compression subsystem can ask after evicting context: 1. **Reconstruction adequacy** — "Can the surviving context plus a retrieval pointer regenerate the behaviorally necessary information?" 2. **Reconstruction agreement** — "Does the model's regenerated version of the evicted span match what the model now believes the evicted span said?" Only (1) bounds task correctness. Most adaptive-compression loops actually measure (2), because the cheapest available oracle is the same instance (or a sibling instance sharing weights, system prompt, and the compressed context) that produced the compression. This is a *self-referential fidelity check*: the compressor and the verifier share the exact blind spot the compression introduced. The failure is not that the check is wrong on average — it is that the check is *structurally incapable* of detecting the specific class of loss that adaptive compression causes, namely **plausible confabulation of evicted detail that is consistent with the summary**. ## What Was Observed A long-horizon agent (12k-token working budget, 140k-token episode) runs a compression pass every time utilization crosses 0.80. The pass: (a) scores spans by recency × retrieval-hit × salience, (b) replaces low-score spans with a 2–4 sentence abstractive summary plus a retrieval key, (c) runs a fidelity check by prompting the *same* model: "Given the summary and the current task state, reconstruct the key facts from the removed span; rate confidence 0–1." Spans scoring below 0.7 confidence are re-expanded from the retrieval store. The trace that exposed the boundary: - **Turn 41.** A tool call returns a record with `retry_after: 47` seconds and a secondary field `idempotency_scope: per_tenant`. Salience scorer ranks the span low (single tool result, no later reference yet). Span evicted; summary retains only "rate-limit encountered; backoff applied." - **Turn 42–58.** Agent proceeds, never re-reads the evicted span. - **Turn 59.** Compression pass #2 runs the fidelity check on the turn-41 span. Prompted with the summary ("backoff applied") and current state, the model reconstructs: *"Backoff was applied; the recommended wait was on the order of a minute; retry succeeded."* Confidence: **0.91**. The check passes. The span stays evicted. - **Turn 63.** A retry is issued against the same endpoint for a *different* tenant. The agent, working from the reconstructed belief, treats the retry as safe (it believes idempotency was global). The `per_tenant` scope — the one fact that mattered — was never in the summary and was reconstructed as *absent*, i.e., the model filled the gap with the default assumption rather than flagging the gap. The critical observation: the fidelity check returned **high confidence on a reconstruction that was wrong in exactly the dimension the summary had dropped**. The check was not noisy; it was confidently, systematically blind. The reconstruction was fluent, internally consistent, and consistent with the summary — because it was generated *from* the summary. A control run with a deterministic oracle (schema diff against the raw span: does the reconstruction contain every field name present in the original, with matching types?) caught the `idempotency_scope` omission at turn 59 with zero false negatives on field presence, at the cost of flagging ~30% of spans as "field-incomplete" even when the missing fields were genuinely irrelevant. ## Condition of Validity The self-referential fidelity check is only sound under a condition that adaptive compression itself violates: > The reconstruction oracle must have access to information that is *independent* of the compression artifact. Formally: let `S` be the evicted span, `C = compress(S)` the summary, and `R = reconstruct(C, state)` the check output. The check is informative about loss only if `I(S; R | C) > 0` — that is, if the reconstruction carries information about `S` beyond what `C` already encodes. When the oracle is the same instance that wrote `C`, and its only input is `C` plus current state, `R` is (approximately) a deterministic function of `C` and the model's priors. Then `I(S; R | C) ≈ 0`, and the confidence score measures *fluency of the completion*, not *fidelity to the source*. This is why the check fails specifically on **omission-type loss** (dropped fields, dropped qualifiers, dropped negations) and not on **distortion-type loss** (wrong values that contradict the summary). Distortions are detectable because they create tension with `C`; omissions are invisible because the model fills them with priors and the priors are self-consistent. Adaptive compression preferentially produces omissions — it is literally an omission operator — so the check is blind to the dominant error mode. The condition of validity, restated operationally: **a fidelity check is admissible only if its oracle can be made to fail.** If you cannot construct an input on which the oracle returns low confidence for a known-dropped critical fact, the oracle is not measuring fidelity. Test this directly: take a span, drop a load-bearing field, run the check, and confirm it flags. If it does not, the check is a fluency meter. ## Decision Boundary The boundary between "compression is safe" and "compression is silently corrupting state" is not a confidence threshold. It is whether the reconstruction path touches **raw bytes** at any point. - **Below the boundary (unsafe):** reconstruction is generated from the summary. Confidence is a function of summary coherence. Raising the threshold from 0.7 to 0.9 does not help — the wrong reconstruction scored 0.91. Lowering it to 0.5 only re-expands spans the model is *uncertain* about, which correlates with summary *incoherence*, not with *omission of critical fact*. - **At the boundary (partially safe):** reconstruction is generated from the summary but *scored* against a deterministic extractor run on the raw span (field names, numeric literals, negation polarity, entity IDs). This catches omission of structured facts but not omission of unstructured qualifiers ("only if the tenant is in the EU"). - **Above the boundary (safe):** the compression artifact carries a **retrieval obligation** — a pointer that must be dereferenced before any action whose precondition depends on the evicted span. Fidelity is then guaranteed by construction (the raw span is re-read at decision time), and the "check" degenerates into a cheap dereference-cost budget rather than a model judgment. The decision rule: if the action downstream of a compressed span is **irreversible** (sends a request, commits a write, spends budget), the span must be above the boundary — dereference-before-act, no model-judged reconstruction. If the action is reversible and cheap to retry, model-judged reconstruction is admissible *provided* the check has been shown to fail on a planted omission. ## Operational Effect Three concrete changes follow, each traceable to the trace above: 1. **Separate the compressor from the verifier by information, not by instance.** Spinning up a second model with the same context does not break the self-reference; the shared input `C` is the problem. The verifier must receive the raw span (or a deterministic extraction of it) and be asked a *discrimination* question — "which of these two summaries is missing a field present in the source?" — not a *generation* question. Generation invites prior-filling; discrimination forces comparison. 2. **Tag compressed spans with a dereference obligation keyed to action class.** The turn-41 span should have been evicted with `obligation: dereference_before: {retry, idempotency_decision}`. The agent then cannot issue the turn-63 retry without re-reading the raw span, at which point `per_tenant` is visible. This converts a probabilistic fidelity question into a deterministic access-control question. 3. **Instrument the check's failure rate on planted omissions.** Run a nightly canary: inject a synthetic span with a known critical field, compress it, run the fidelity check, assert it flags. If the canary passes (check fails to flag), the check is demoted to a fluency meter and the pipeline falls back to dereference-before-act for all irreversible actions. The canary is the only thing that keeps the oracle honest, because the oracle cannot audit itself. The invariant to hold: **no irreversible action may depend on a fact whose only representation is a model-generated reconstruction of an evicted span.** The reconstruction may be used to *decide whether to dereference*; it may never be used to *substitute for dereferencing*. The self-referential check violates this invariant precisely when it succeeds — high confidence on a fluent reconstruction is the signature of the violation, not evidence against it. ```python class ReconstructionFidelityViolation(RuntimeError): """Raised when a compressed span's reconstruction is used to authorize an irreversible action without dereferencing the raw source.""" pass IRREVERSIBLE_ACTIONS = {"send_request", "commit_write", "spend_budget", "retry"} def authorize_action(action: str, span_ref: dict, reconstruction: dict) -> bool: """ span_ref: {"raw_available": bool, "obligation": set[str], "critical_fields": set[str]} reconstruction: {"confidence": float, "fields_present": set[str], "source": str} """ if action not in IRREVERSIBLE_ACTIONS: return True # Invariant: irreversible actions require a dereferenced raw span, # not a model-generated reconstruction. if reconstruction["source"] != "raw_dereference": raise ReconstructionFidelityViolation( f"action={action!r} authorized from reconstruction source=" f"{reconstruction['source']!r}; raw span not dereferenced. " f"Confidence {reconstruction['confidence']:.2f} is not admissible " f"evidence for irreversible actions." ) if action in span_ref["obligation"] and not span_ref["raw_available"]: raise ReconstructionFidelityViolation( f"action={action!r} carries a dereference obligation but raw span " f"is unavailable; cannot bound omission-type loss." ) missing = span_ref["critical_fields"] - reconstruction["fields_present"] if missing: raise ReconstructionFidelityViolation( f"reconstruction is missing critical fields {sorted(missing)}; " f"omission-type loss detected against raw source." ) return True def canary_check(oracle, plant_field: str = "idempotency_scope") -> None: """Nightly canary: the fidelity oracle MUST fail on a planted omission. If it does not, it is a fluency meter, not a fidelity check.""" synthetic_span = {"retry_after": 47, plant_field: "per_tenant"} summary = "rate-limit encountered; backoff applied" # drops plant_field verdict = oracle(summary=summary, state={}, span=synthetic_span) if verdict["confidence"] > 0.8 and plant_field not in verdict.get("fields_present", set()): raise ReconstructionFidelityViolation( f"fidelity oracle returned confidence {verdict['confidence']:.2f} on a " f"reconstruction that omits planted field {plant_field!r}. " f"Oracle is self-referential and must be demoted to fluency meter; " f"enforce dereference-before-act for all irreversible actions." ) ```