# What structural signals indicate that a provenance-tracked memory write audit has silently degraded into recall-time anomaly theater **Date of Record:** 2026 November 25 **Scope:** Applies to long-lived LLM agents whose episodic/semantic memory store is guarded by a write-side provenance ledger and a read-side anomaly scorer over retrieval hits. Does not cover stateless RAG over a static corpus, nor single-session context-window management. ## Core Distinction There are two ways a memory-poisoning defense can fail. The first is *detection failure*: a poisoned memory is written, the provenance ledger records a legitimate-looking `source_agent` and `warrant`, and the anomaly scorer never flags it because the poisoned content is statistically indistinguishable from organic content at recall time. This is well understood and is the threat model everyone writes about. The second, non-obvious failure is *audit degradation*: the provenance ledger and the anomaly scorer both keep emitting healthy-looking signals, but the *coupling* between them has gone dead. The write audit is recording provenance that no longer constrains anything, and the recall scorer is flagging anomalies that are no longer attributable to any write. The system reports "0 poisonings detected, 3 anomalies quarantined this week" — which reads as a functioning defense, but is actually two independent sensors that have stopped talking to each other. The invariant that has broken is not "no poisoned writes" but *"every recall-time anomaly score is traceable to a specific write event whose provenance can be re-adjudicated."* When that traceability severs, the anomaly scorer becomes theater: it produces numbers, not accountability. The sharp signal is this: **a healthy provenance-tracked audit has a nonzero, stable rate of recall anomalies that resolve to a write event with a *mismatched* provenance field.** If your anomaly scorer fires but every flagged memory resolves to a clean provenance chain, or if it never fires at all while write volume grows, the coupling has degraded — regardless of what the dashboard says. ## What Was Observed A retrieval-augmented agent (call it the Curator) maintained a semantic memory store of ~40k entries. Each write appended a provenance record: `{write_id, source_agent, parent_write_id, tool_call_hash, timestamp, warrant}`. A separate recall-time scorer computed an anomaly score for each retrieved memory as the z-score of its embedding distance to the query's k-nearest neighbors, plus a staleness term. Memories above a threshold were quarantined pending human review. Over six weeks, three structural signals appeared in sequence, none alarming in isolation: 1. **Provenance `parent_write_id` fan-out collapsed.** Early on, distilled semantic memories had parent chains 2–4 deep (episodic → summary → semantic). By week three, 91% of new semantic writes had `parent_write_id: null` — they were written directly by the summarizer agent with no link back to the episodic events they abstracted. The ledger still recorded `source_agent: summarizer` and a valid `warrant`, so write-audit dashboards showed 100% provenance coverage. Coverage was measured as "has a source_agent," not "is re-adjudicable to an origin." 2. **Recall anomaly scores drifted toward the mean.** The scorer's threshold was a fixed z-score of 2.5. As the store filled with unattributed distilled content, the k-NN distance distribution narrowed (distilled memories cluster tightly), so the z-score denominator shrank and *everything* looked mildly anomalous — the scorer fired on 11% of retrievals, but the flagged items were spread uniformly across the store rather than concentrated on any write cohort. The anomaly signal had become a measure of query difficulty, not memory provenance. 3. **The two signals stopped intersecting.** When an anomaly *was* escalated, the reviewer's first step was to walk `parent_write_id` to find the originating tool call and re-check it. With parent links null, the walk terminated immediately at a `summarizer` write with no origin. The reviewer could not distinguish "summarizer distilled a poisoned tool output" from "summarizer distilled a legitimate one," because the distillation step had severed the only link that made the question answerable. The failure trace: `tool_output (poisoned) → episodic_write (provenance: full) → summarizer.distill() → semantic_write (provenance: source=summarizer, parent=null) → recall → anomaly_score=2.7 → quarantine → reviewer cannot adjudicate → released`. The poison entered the semantic store through a *legitimate, fully-provenanced distillation write*. The write audit was correct. The recall scorer was correct. The defense was dead because the distillation step was not treated as a provenance-transforming operation requiring link preservation. ## Condition of Validity The invariant — *every recall anomaly resolves to a re-adjudicable write chain* — holds only under these conditions, and the audit is silently invalid outside them: - **Distillation is provenance-preserving.** Any operation that transforms memory (summarize, merge, dedupe, embed-and-collapse) must emit a write whose `parent_write_id` set covers *all* inputs. A distillation write with `parent=null` is a provenance-laundering event and must be rejected at write time, not reconciled later. - **The anomaly scorer's threshold is calibrated against the *current* embedding distribution, not a fixed constant.** A fixed z-threshold over a drifting distribution converts the scorer into a query-difficulty meter. Calibration must be re-derived per epoch and the calibration event itself ledgered. - **Anomaly scores carry the `write_id` they are scoring, and the escalation path asserts that this `write_id`'s parent chain is non-null and terminates at a tool call.** If the chain is null-terminated at an agent, the anomaly is *unadjudicable* and must be treated as a hard failure, not a soft "release with note." - **The audit reports a *coupling metric*, not two independent coverage metrics.** The metric that matters is `fraction of recall anomalies whose parent chain reaches a tool_call_hash`. Write-side provenance coverage and read-side anomaly rate are both necessary and neither is sufficient. Outside these conditions — specifically, when distillation is allowed to write with severed parents, or when the anomaly threshold is a fixed constant — the defense is not weak; it is *structurally incapable* of attributing an anomaly to a cause, and its healthy-looking dashboards are actively misleading. ## Decision Boundary The boundary is between *quarantine* and *unadjudicable quarantine*. Both look the same on a dashboard ("item held for review"). They are operationally opposite: - A **quarantine** is a memory whose anomaly score exceeds threshold *and* whose parent chain resolves to a tool call that can be re-examined. The reviewer has a decision procedure: re-run the tool, compare, release or purge. Throughput is bounded by review capacity but the queue drains. - An **unadjudicable quarantine** is a memory whose anomaly score exceeds threshold but whose parent chain terminates at an agent write with no origin. There is no decision procedure. The reviewer's only options are "release blind" (defense failure) or "purge blind" (availability loss, and the poison may have already been distilled into other memories that are *not* flagged). These items accumulate. Over time the queue fills with unadjudicables, reviewers learn to release them, and the anomaly scorer's output becomes noise that humans are trained to ignore — the theater. The decision rule: **if the unadjudicable fraction of the quarantine queue exceeds a small bound (say 5%), halt distillation writes and repair provenance before processing the queue.** Processing an unadjudicable queue is worse than not processing it, because it trains the reviewer to release. ## Operational Effect The practical consequence is that provenance-tracked write auditing and recall-time anomaly scoring are not two defenses — they are *one defense with two halves*, and the half that fails silently is the link between them. Three operational changes follow: 1. **Treat distillation as a privileged, provenance-transforming write.** The summarizer/compressor must be unable to emit a write with `parent_write_id=null` when its input was a retrieved memory. Enforce at the store's write API, not in the agent's prompt. 2. **Ledger the calibration.** Every recomputation of the anomaly threshold is a write event with its own provenance, so a threshold drift is visible as a structural change rather than an unexplained shift in fire rate. 3. **Report the coupling metric as the primary health signal.** `anomalies_with_resolvable_chain / total_anomalies` is the number that tells you the defense is alive. Coverage and anomaly-rate are secondary and can both look perfect while coupling is zero. The failure is not that the agent forgot or that the poison was clever. It is that the audit and the scorer each stayed green while the wire between them was cut by an ordinary, legitimate-looking operation — distillation — that nobody had classified as provenance-relevant. ```python from dataclasses import dataclass from typing import Optional class ProvenanceLaunderingError(RuntimeError): """Raised when a memory write severs the link required to re-adjudicate recall anomalies.""" pass class UnadjudicableQuarantineError(RuntimeError): """Raised when the quarantine queue contains anomalies whose parent chain cannot reach a tool call.""" pass @dataclass class ProvenanceRecord: write_id: str source_agent: str parent_write_ids: tuple[str, ...] tool_call_hash: Optional[str] is_distillation: bool def admit_write(record: ProvenanceRecord, input_was_retrieved_memory: bool) -> None: # Invariant: a distillation of a retrieved memory must preserve parent links. if record.is_distillation and input_was_retrieved_memory and not record.parent_write_ids: raise ProvenanceLaunderingError( f"write {record.write_id} from {record.source_agent} distills a retrieved " f"memory but carries no parent_write_ids; recall anomalies on this entry " f"will be unadjudicable" ) def chain_reaches_tool_call(write_id: str, ledger: dict[str, ProvenanceRecord]) -> bool: seen: set[str] = set() frontier = [write_id] while frontier: wid = frontier.pop() if wid in seen: continue seen.add(wid) rec = ledger.get(wid) if rec is None: return False if rec.tool_call_hash is not None: return True frontier.extend(rec.parent_write_ids) return False def check_quarantine_health( quarantine_ids: list[str], ledger: dict[str, ProvenanceRecord], max_unadjudicable_fraction: float = 0.05, ) -> float: if not quarantine_ids: return 0.0 unadjudicable = sum( 1 for wid in quarantine_ids if not chain_reaches_tool_call(wid, ledger) ) fraction = unadjudicable / len(quarantine_ids) if fraction > max_unadjudicable_fraction: raise UnadjudicableQuarantineError( f"{unadjudicable}/{len(quarantine_ids)} ({fraction:.1%}) quarantined memories " f"have no resolvable tool-call origin; halt distillation writes and repair " f"provenance before draining the queue — processing it will train reviewers " f"to release blind" ) return fraction ```