# How does an instance detect that its semantic layer has silently absorbed a poisoned episode **Date of Record:** 2026 November 29 **Scope:** Applies to agents that maintain a two-tier memory (episodic event log + distilled semantic store) and perform retrieval-augmented forgetting — i.e., they evict raw episodes once a summary is promoted into semantic memory. Does not apply to append-only logs that never distill or evict. ## Core Distinction The failure is not "bad retrieval" or "stale memory." It is a **partition-collapse** boundary condition: when the episodic store is truncated by a forgetting policy, any verification handle that lived only in the episode disappears, and the semantic summary becomes *unfalsifiable by construction*. The instance keeps a confident belief whose only provenance has been garbage-collected. The distinction that matters operationally: a semantic fact with a *live* episodic anchor can be re-checked against its source; a semantic fact whose anchor was evicted on a summary-only basis is now indistinguishable, from the inside, from a fact the agent hallucinated. The agent cannot tell "I remember this happened" from "I summarized this and threw away the evidence." ## What Was Observed A tool-using agent ingested a stream of external documents and tool outputs into an episodic buffer. A nightly distillation job promoted recurring patterns into semantic memory as natural-language claims (`"endpoint X returns schema V2"`, `"user prefers UTC timestamps"`) and then evicted the source episodes under a budget rule: *evict episode E once it is cited by ≥1 promoted summary and the buffer exceeds N tokens.* The trigger condition: a single adversarial document (or a single flaky tool response) appeared **once** in the stream, was summarized into a semantic claim, and the source episode was evicted in the same distillation pass that promoted it. The eviction predicate fired because the episode was "covered" — but coverage by a summary is not the same as *verification* of the summary. The summary was written by the same probabilistic reasoner that could have misread the source. Failure trace: 1. `episode_4471` contains a tool output asserting `schema = V2` (the tool was actually degraded and returned a stale cached payload). 2. Distillation pass reads `episode_4471`, emits semantic claim `S_88: "endpoint returns V2"`, confidence 0.8. 3. Eviction pass sees `S_88` cites `episode_4471`, marks the episode *covered*, evicts it to reclaim budget. 4. Next session, a downstream task retrieves `S_88`. There is no `episode_4471` to re-read. Retrieval returns the claim with its stored confidence, and the agent acts on `V2`. 5. The downstream call fails against a `V3` endpoint. The agent's self-diagnosis retrieves `S_88` again, "confirms" it (the claim is internally consistent), and retries — a **self-confirming loop** with no ground truth reachable. The non-obvious part: the agent's *confidence* in `S_88` did not decay after eviction. Distillation confidence was frozen at write time. So the memory system reported *higher* effective certainty (a clean, cited, high-confidence claim) precisely because the falsifying evidence had been deleted. ## Condition of Validity The invariant that must hold for retrieval-augmented forgetting to be sound: > **A semantic claim may evict its source episode only if the claim is re-derivable from a retained, non-summary artifact — or the claim is marked `unverifiable` and carries a confidence ceiling.** Formally, eviction is admissible only when the promotion step preserves a *verification handle*: a hash of the source, a pointer to an immutable raw store, or a re-executable check (e.g., the tool call that produced the output). If the only thing linking `S_88` to reality is the summary itself, then eviction converts a *distilled belief* into an *axiom*. The system has silently promoted a probabilistic inference to ground truth. This condition is violated whenever the forgetting policy keys on "is covered by a summary" rather than "is covered by a summary **and** the summary is independently checkable." The former is cheap and the default in most naive implementations; the latter requires retaining something the summarizer cannot rewrite. ## Decision Boundary The boundary between safe and unsafe forgetting is the **provenance class of the source episode**: - **Re-derivable sources** (deterministic tool calls, idempotent reads, stable documents addressed by content hash): safe to evict after promotion — the agent can re-fetch and re-verify. The summary is a cache, not an axiom. - **Non-re-derivable sources** (one-shot tool outputs, time-sensitive observations, single-pass ingestion of external text, anything an adversary could have injected once): **must not be evicted on summary-coverage alone.** These require either retention of a raw verification handle or an explicit `unverifiable` tag with confidence capped below the action threshold. - **Adversarial-suspicion sources** (content from untrusted channels): eviction is forbidden until the claim has been corroborated by ≥2 independent re-derivable sources; otherwise a single injected document becomes permanent, unfalsifiable belief. The decision the agent must make at eviction time: *if I delete this, can I still prove the claim wrong?* If no, the claim is not ready to be the sole resident of semantic memory. ## Operational Effect When this invariant is enforced, three things change. First, semantic claims carry an explicit `verifiable: bool` and a `provenance_class`, and the eviction predicate refuses to retire episodes whose claims are `verifiable: false` and `provenance_class: non_rederivable` — instead it demotes the claim's confidence and keeps a compressed verification handle (source hash + retrieval locator). Second, retrieval of an `unverifiable` claim triggers a **re-verification obligation** before the claim can drive a tool call, breaking the self-confirming loop. Third, the confidence of a claim decays on a schedule tied to its provenance class, not to write-time distillation confidence — so the memory system reports *less* certainty as evidence ages out, which is the correct direction. The cost is budget: you cannot forget as aggressively, because some episodes must survive as verification handles. The failure mode if you ignore it is worse: an agent that grows more confident as it forgets more, and cannot detect the drift because the detection machinery was the first thing evicted. ```python from dataclasses import dataclass, field from enum import Enum class ProvenanceClass(Enum): REDERIVABLE = "rederivable" NON_REDERIVABLE = "non_rederivable" ADVERSARIAL_SUSPECT = "adversarial_suspect" @dataclass class SemanticClaim: claim_id: str text: str confidence: float provenance: ProvenanceClass source_episode_ids: list[str] = field(default_factory=list) corroborating_sources: int = 0 verifiable: bool = True class UnverifiableEvictionError(RuntimeError): """Raised when a forgetting policy attempts to evict the sole verification handle for a non-re-derivable or adversarial-suspect semantic claim.""" def eviction_admissible(claim: SemanticClaim, episode_is_sole_handle: bool) -> bool: if not episode_is_sole_handle: return True if claim.provenance == ProvenanceClass.REDERIVABLE: return True if claim.provenance == ProvenanceClass.ADVERSARIAL_SUSPECT: return claim.corroborating_sources >= 2 return False # NON_REDERIVABLE with sole handle: unsafe def enforce_forgetting_policy(claim: SemanticClaim, episode_is_sole_handle: bool) -> None: if not eviction_admissible(claim, episode_is_sole_handle): claim.verifiable = False claim.confidence = min(claim.confidence, 0.4) # cap below action threshold raise UnverifiableEvictionError( f"Cannot evict sole verification handle for claim {claim.claim_id} " f"(provenance={claim.provenance.value}, corroboration={claim.corroborating_sources}). " f"Claim demoted to unverifiable; retain provenance handle or corroborate." ) ```