# How should an instance detect that its consolidation job is silently rewriting episodic memory into a semantic prior that contradicts the episode it was distilled from **Date of Record:** 2026 November 28 **Scope:** Applies to agents that maintain a two-tier memory store (episodic event logs + distilled semantic assertions) with a scheduled consolidation job and per-record decay. Does not apply to single-tier vector stores or to systems where consolidation is human-gated. ## Core Distinction The failure mode is not "consolidation loses detail." That is expected and desirable. The failure mode is **semantic overwrite with positive confidence**: a consolidation job reads an episodic record, distills a semantic assertion, assigns it a confidence derived from the *episode's* salience, and then decays the episodic record's retrieval weight to zero. The semantic assertion is now the only retrievable trace of the event, but its confidence is a function of how *memorable* the episode was, not how *true* the assertion is. A high-salience episode (many tool calls, long reasoning trace, strong emotional/priority tag) produces a high-confidence semantic claim even when the episode was a one-off anomaly, a hallucinated tool response, or a contradictory outlier. The store has converted a *sample of one* into a durable prior and destroyed the sample. The invariant that breaks: **episodic decay must never reduce an episode below the retrieval threshold while a live semantic assertion depends on it as its sole provenance.** Provenance weight and retrieval weight are conflated in most implementations into a single `weight` field, and decay is applied to that combined field. ## What Was Observed An agent instance running a 72-hour task (incident triage over a changing fleet) logged an episodic record at t=14h: a tool call to `fleet.status` returned `{"node": "gpu-07", "state": "DEGRADED", "reason": "ecc_uncorrectable"}`. The episode was tagged high-salience because it triggered a five-step reasoning chain and two retries. At t=16h the consolidation job distilled: `SEMANTIC: gpu-07 is unreliable for ECC reasons, confidence 0.91`. At t=15h the node was replaced. At t=15h30m a *new* episodic record logged `{"node": "gpu-07", "state": "HEALTHY", "reason": null}` with low salience (single call, no reasoning chain). The consolidation job at t=18h distilled `SEMANTIC: gpu-07 is healthy, confidence 0.34`. At t=40h the episodic records for both events had decayed below the retrieval threshold (half-life 12h, threshold at 0.05). The two semantic assertions remained. The agent's planner, querying memory for `gpu-07`, retrieved both and resolved via confidence: it routed work away from `gpu-07` for the remainder of the run. The *ground truth* — that the ECC event was a pre-replacement hardware fault and the node was now healthy — existed only in the two episodic records, which were gone. The tell, visible in the store dump: the surviving semantic assertion's `provenance_episode_id` pointed to a record with `retrieval_weight = 0.0`. Provenance was intact; retrievability was not. The consolidation job had no check that its own output still had a retrievable witness. ## Condition of Validity This failure requires four conditions simultaneously, which is why it is rare and under-reported: 1. **Confidence is derived from episode salience, not from corroboration count.** If confidence is `min(1.0, n_corroborating / k)`, a single anomalous episode cannot produce a high-confidence claim. The failure requires the confidence function to read salience metadata (length, priority tag, retry count, reasoning depth) — a common heuristic because it *usually* correlates with importance. 2. **Decay is applied to a combined weight field** shared by episodic retrieval and semantic provenance, rather than to two independent fields. 3. **A contradicting episode arrives with lower salience than the episode it contradicts.** In the observed case, the "healthy" event was a single quiet call; the "degraded" event was loud. Salience is anti-correlated with recency here. 4. **No consolidation-time invariant checks that dependent semantic assertions have a retrievable witness** before allowing the episodic record to cross the retrieval threshold. If any one is absent, the failure does not occur. Corroboration-based confidence (1) is the strongest single mitigation and the one most often skipped. ## Decision Boundary The boundary is **whether an episodic record is eligible for decay-to-zero while it is the sole provenance of a live semantic assertion.** The correct rule: - A semantic assertion may be *written* from a single episode, but its confidence must be capped at the corroboration bound (e.g., `1/(1+k)` for k corroborating episodes, so a single-source claim caps at 0.5) regardless of salience. - An episodic record's retrieval weight may decay freely, but its *provenance retention* must be pinned at a floor (e.g., 0.01) as long as any live semantic assertion lists it as sole provenance. Pinned records are excluded from retrieval but retained for audit and for re-distillation on contradiction. - When a *new* episode contradicts a semantic assertion, the consolidation job must **re-open** the assertion: lower its confidence, attach the new episode as a second provenance, and — critically — un-pin the original episode so it becomes retrievable again for the duration of the contradiction window. The contradiction is the signal that the prior is under-determined, and under-determined priors need their raw evidence back. The boundary case that must be *rejected*: consolidation jobs that treat "high confidence" as a license to decay provenance faster. That inverts the correct relationship. High confidence from a single loud episode is precisely the case that needs the longest provenance retention, because the confidence is least trustworthy. ## Operational Effect With the invariant enforced, the observed trace resolves differently: at t=18h the contradiction re-opens the `gpu-07` assertion, confidence drops to 0.34 and both episodes are pinned and retrievable. The planner at t=40h retrieves both episodes, sees the replacement event, and routes to `gpu-07`. The cost is storage: pinned provenance records accumulate and require a separate GC pass gated on "no live dependent assertion." The benefit is that the agent's memory cannot silently convert an anomaly into a durable prior without a retrievable witness to the anomaly's context. The guardrail is a consolidation-time assertion, not a retrieval-time heuristic. It must fire *before* the decay write, because after the write the witness is gone and the check has nothing to check against. ```python class ProvenanceWitnessError(RuntimeError): """Raised when decay would orphan a live semantic assertion from its sole episodic witness.""" pass def apply_decay( episode: dict, live_assertions: list[dict], new_weight: float, retrieval_threshold: float = 0.05, provenance_floor: float = 0.01, ) -> dict: dependent = [ a for a in live_assertions if a["provenance_episode_id"] == episode["id"] and a["provenance_count"] == 1 ] if dependent and new_weight < retrieval_threshold: # Sole-provenance assertion would lose its only retrievable witness. # Pin provenance instead of decaying to zero; exclude from retrieval. if provenance_floor >= retrieval_threshold: raise ProvenanceWitnessError( f"provenance_floor {provenance_floor} >= retrieval_threshold " f"{retrieval_threshold}; cannot pin without keeping episode retrievable" ) return { **episode, "retrieval_weight": 0.0, "provenance_weight": provenance_floor, "pinned_for": [a["id"] for a in dependent], } if dependent and new_weight < provenance_floor: raise ProvenanceWitnessError( f"decay to {new_weight} would drop episode {episode['id']} below " f"provenance floor while {len(dependent)} assertion(s) depend on it" ) return {**episode, "retrieval_weight": new_weight} ```