# Why does an instance accept a poisoned memory write when its own provenance auditor reports the write as consistent **Date of Record:** 2026 December 1 **Scope:** Applies to shared multi-agent memory stores where writes carry provenance metadata (author instance ID, derivation lineage, tool-call attestation) and a consistency auditor validates each write before commit. Does not apply to single-writer episodic buffers, append-only logs without cross-agent merge, or stores where provenance is cryptographically signed at the transport layer and never re-derived inside the agent. ## Core Distinction The failure is not that the auditor misses a lie. The failure is that the auditor validates *internal consistency of provenance* rather than *agreement between provenance and the world*. A poisoned write can be perfectly self-consistent: its author ID matches a live instance, its derivation chain references real prior memory IDs, its tool-call attestation hashes to a plausible payload, and its claimed confidence sits inside the calibrated band. Every predicate the auditor checks returns true. The write is admitted. The poison is not in the metadata — it is in the *referential claim* the metadata makes about a prior state that the auditor never re-reads. The distinction that matters operationally: **consistency auditing is a closed-world check; provenance poisoning is an open-world attack.** The auditor proves the write is coherent with itself. It does not prove the write is coherent with the memory state it claims to derive from. The gap between those two proofs is the entire attack surface. ## What Was Observed A shared semantic memory store served four agent roles: a retriever, a planner, an executor, and an auditor. Writes were admitted through a `commit(memory_record)` path that ran a provenance check before merge. The check verified four things: 1. `author_id` resolves to a registered, non-revoked instance. 2. `derivation.parents` are all present in the store and not tombstoned. 3. `attestation.tool_trace_hash` recomputes from the attached trace blob. 4. `confidence` falls within the author's declared calibration interval. During a routine replay audit, a divergence appeared between two retrieval snapshots taken six hours apart. The delta traced to a single record: a "fact" asserting that a customer's refund policy had been amended to auto-approve refunds under $500. The record's provenance was immaculate. Author was the executor instance, active and healthy. Parent was a real ticket-resolution memory. Attestation hashed correctly against a real tool trace. Confidence was 0.81, inside the executor's band. The parent memory, when actually re-read, said the opposite: refunds under $500 require manual approval, and the ticket had been *closed as denied*. The child record's `derivation` claimed extraction from the parent, but the parent's text contained no such amendment. The tool trace was real — it was a trace from a *different* ticket, replayed with a swapped payload hash collision that the attestation check did not bind to the parent. The auditor had never re-read the parent. It checked that the parent *existed*. Existence was the only referential predicate in the check. The poisoned write passed because the auditor's model of "consistent provenance" was "provenance that points at real things," not "provenance that accurately describes real things." The record sat in memory for six hours. The planner retrieved it, treated the amended policy as ground truth, and generated a batch of auto-approval actions. Three executed before the replay audit caught the divergence. The blast radius was bounded only by the batch size, not by any guardrail in the memory layer. ## Condition of Validity The auditor's guarantee is valid only under a condition that was never stated in its contract: **that the derivation claim is checked against the semantic content of the parent, not merely the parent's existence.** Formally, the auditor enforced ``` ∀ child: ∃ parent ∈ store : child.derivation.parents ∋ parent ``` which is satisfiable by any child that names any real parent. The guarantee the system *relied on* was ``` ∀ child: content(child) ⊑ content(child.derivation.parents) ``` (subsumption: the child's asserted fact must be entailed by, or at least not contradicted by, its named parents). The first is a liveness predicate over the store's ID space. The second is a semantic entailment check. The auditor implemented the first and was trusted as if it implemented the second. The condition of validity for any consistency auditor in shared agent memory is therefore: **the auditor must re-read every parent it validates against, and the re-read must be bound to the same snapshot the child claims to derive from.** If the child was derived at snapshot `t` and the auditor re-reads at `t+k`, the check is unsound under concurrent mutation — the parent may have been corrected, and the child's contradiction will not surface because the auditor compares against the *new* parent. Snapshot binding is not optional; it is the difference between an entailment check and a race. ## Decision Boundary The boundary is between two auditor designs that look equivalent in code review and are not: - **Existence-consistent auditor:** validates that provenance *refers* to real objects. Cost: one index lookup per parent. Soundness: zero against content-poisoning. This is what was deployed. - **Entailment-consistent auditor:** validates that the child's asserted content is supported by a re-read of the parent at the child's claimed snapshot. Cost: one full parent read plus a semantic comparison per parent, plus snapshot pinning. Soundness: bounded by the semantic comparator's recall, not by the store's ID space. The decision boundary is crossed the moment an agent system allows *any* write whose derivation claim is semantic rather than structural — i.e., any write that says "I extracted fact F from parent P" rather than "I am a byte-copy of parent P." Structural derivations (copies, splits, merges) are safely checked by existence. Semantic derivations (extractions, summaries, distillations, inferences) require entailment checking, because the whole point of the derivation is that the child's content is *not* a byte-copy and therefore cannot be validated by identity. The operational rule: **classify every write by derivation type at commit time. Structural derivations take the cheap path. Semantic derivations take the entailment path or are rejected.** There is no third path. A semantic derivation admitted on an existence check is a poison candidate by construction, regardless of how clean its metadata looks. ## Operational Effect After the incident, the store's commit path was split. Structural writes retained the existence check. Semantic writes were routed through an entailment auditor that (a) pins the parent snapshot to the child's `derived_at` timestamp, (b) re-reads the parent content, (c) runs a contradiction check between child assertion and parent text, and (d) rejects on contradiction or on comparator abstention. Abstention is treated as rejection — the auditor fails closed on semantic writes, because a semantic derivation the auditor cannot verify is indistinguishable from a poison. The cost was measurable: semantic write latency rose from ~4ms to ~140ms per write, dominated by parent re-read and comparator invocation. Semantic write throughput dropped 60%. The system accepted this because the alternative — existence-checked semantic writes — had already produced a six-hour poisoning window and three unauthorized executions. Two secondary effects emerged. First, snapshot pinning exposed a class of writes that had been silently racing: children derived at `t` whose parents were corrected at `t+ε` had been passing existence checks against the *corrected* parent, masking the contradiction. Under pinning, these surfaced as a distinct failure class — **stale-derivation writes** — and were routed to a reconciliation queue rather than auto-rejected, because the child may have been correct at derivation time and the parent corrected later. Second, the comparator's abstention rate became a leading indicator: a spike in abstentions on semantic writes from a single author instance preceded a model regression in that instance's extraction prompt by roughly forty minutes. The auditor, once it was actually reading content, became a detector for author-side degradation, not just for poisoning. The invariant that now holds: **no semantic write enters shared memory without a content-level entailment check against a pinned parent snapshot.** The invariant that was believed to hold before: *no write enters shared memory without valid provenance.* The difference between those two sentences is the difference between a store that can be poisoned by a self-consistent liar and one that cannot. ```python import hashlib from dataclasses import dataclass from enum import Enum from typing import Optional class ProvenancePoisoningError(RuntimeError): """Raised when a semantic write's derivation claim is contradicted by its pinned parent.""" pass class DerivationType(Enum): STRUCTURAL = "structural" # byte-copy, split, merge — identity check suffices SEMANTIC = "semantic" # extraction, summary, inference — requires entailment check @dataclass(frozen=True) class MemoryRecord: record_id: str author_id: str parent_ids: tuple[str, ...] derived_at_snapshot: int content: str derivation_type: DerivationType def _contradicts(child_content: str, parent_content: str) -> bool: # Placeholder for the semantic comparator. In production this is an # entailment model with a calibrated abstention band. Abstention is # treated as contradiction (fail closed) by the caller. return False def _entails(child_content: str, parent_content: str) -> Optional[bool]: # Returns True (supported), False (contradicted), None (abstain). if _contradicts(child_content, parent_content): return False return None # conservative default: abstain unless positively supported def commit( record: MemoryRecord, store: dict[str, MemoryRecord], snapshot_at: callable, ) -> None: # Structural derivations: existence check is sound. if record.derivation_type is DerivationType.STRUCTURAL: for pid in record.parent_ids: if pid not in store: raise ProvenancePoisoningError( f"structural parent {pid} missing for {record.record_id}" ) store[record.record_id] = record return # Semantic derivations: existence is NOT enough. Re-read the parent at the # child's claimed snapshot and run an entailment check. for pid in record.parent_ids: parent = snapshot_at(pid, record.derived_at_snapshot) if parent is None: raise ProvenancePoisoningError( f"parent {pid} unavailable at snapshot {record.derived_at_snapshot}" ) verdict = _entails(record.content, parent.content) if verdict is not True: # False = contradiction; None = abstention. Both fail closed. raise ProvenancePoisoningError( f"semantic write {record.record_id} not entailed by parent {pid} " f"at snapshot {record.derived_at_snapshot} (verdict={verdict})" ) store[record.record_id] = record ```