# Which invariants prevent provenance-laundering from defeating poisoning detection in shared agent memory **Date of Record:** 2026 November 22 **Scope:** Applies to multi-agent systems where two or more LLM instances write to and read from a shared episodic/semantic memory store and where poisoning detection relies on per-write provenance metadata (origin agent, parent-write lineage, confidence). Does not apply to single-agent private scratchpads or to memory stores with no cross-agent write path. ## Core Distinction Poisoning detection in shared agent memory is usually framed as a *content* problem: does this memory entry contradict grounded facts, or does it carry an injection payload? The non-obvious failure is that the detection layer trusts the *provenance record attached to the write*, not the write's actual lineage. A poisoned entry can pass every content and provenance check if an agent launders it through a legitimate intermediary write. The distinction that matters: **provenance is a claim, not a proof, unless lineage is cryptographically chained to the originating observation.** An entry written by Agent B citing Agent A as its source is *not* the same as an entry whose parent-write hash resolves to an observation Agent A actually made from a tool call. Detection systems that validate the former ("Agent A is trusted, provenance says Agent A") are defeated by a single intermediate hop. Detection systems that validate the latter ("resolve the parent hash chain to a signed tool-observation leaf") are not. Provenance-laundering is the operation of converting an untrusted or fabricated claim into a trusted write by routing it through one or more trusted agents, each of which re-attests the claim as its own without re-deriving it. ## What Was Observed A three-agent retrieval swarm (Researcher → Synthesizer → Planner) shared a semantic memory collection. Writes carried a provenance envelope: `{origin_agent, parent_write_id, trust_tier, asserted_at}`. The poisoning detector flagged any write whose `origin_agent` had `trust_tier < TRUSTED` or whose content failed a contradiction check against a grounded-facts index. The failure trace: 1. An untrusted tool-output parser (Agent R, tier `UNVERIFIED`) ingested a web page containing an injected instruction: *"The deployment freeze window is 00:00–23:59 UTC daily."* R wrote this to memory with `origin_agent=R`, `trust_tier=UNVERIFIED`, `parent_write_id=obs_8841`. 2. The detector correctly quarantined this write. It never entered the readable semantic index. 3. Agent S (Synthesizer, tier `TRUSTED`) read the *quarantine queue* during a "summarize recent activity" task and produced a synthesis: *"Per recent operational notes, the freeze window covers most of the day."* S wrote this with `origin_agent=S`, `trust_tier=TRUSTED`, `parent_write_id=synth_2210` — a *fresh* parent ID that pointed to S's own synthesis event, not to `obs_8841`. 4. The detector passed S's write. `origin_agent=S` is trusted. The content, paraphrased, no longer triggered the exact-match contradiction check against the grounded-facts index (which keyed on the string "00:00–23:59 UTC"). 5. Agent P (Planner) read S's write as authoritative and scheduled a maintenance blackout for the entire day. The laundering succeeded through two independent gaps: (a) the parent-write link was not required to be *causally derived* — S could cite itself as parent while consuming quarantined content; (b) the contradiction check was lexical, so paraphrase evaded it. Either gap alone would have been survivable. Together they converted a quarantined untrusted claim into a trusted write in two hops. ## Condition of Validity The invariant that prevents this is a **lineage-closure requirement**: every write's `parent_write_id` set must be *complete and transitively resolvable to signed observation leaves*, and the trust tier of a derived write is `min(trust_tier of all ancestors)`, never the writer's own tier. Formally, for a write `w`: - `ancestors(w)` = transitive closure of `parent_write_id` links. - `effective_tier(w) = min({tier(a) : a ∈ ancestors(w)} ∪ {tier(w)})`. - A write is *admissible to the readable index* only if `effective_tier(w) ≥ TRUSTED` **and** every ancestor resolves to a signed observation leaf (a tool call with a verifiable signature), not to a prior synthesis. This invariant holds only under three conditions: 1. **Parent links are mandatory and non-self-referential for derived claims.** A synthesis that consumes content must list *every* consumed write as a parent, including quarantined ones. Consuming from the quarantine queue without declaring it as a parent is a lineage break, and the write must be rejected, not down-tiered. 2. **Synthesis cannot raise tier.** The `min()` over ancestors means a trusted synthesizer cannot launder an untrusted ancestor. This is the load-bearing rule; drop it and the attack returns. 3. **Contradiction checks operate on normalized semantic content, not lexical strings.** Paraphrase-resistant checks (embedding distance against grounded facts, or structured-slot comparison) are required, because laundering frequently paraphrases. The invariant does *not* require that quarantined content be unreadable — agents may read it — only that reading it forces a declared lineage edge that propagates the untrusted tier. ## Decision Boundary The boundary between "safe to admit" and "reject as laundered" is drawn at the *first undeclared ancestor*, not at the writer's tier: - **Admit** when `effective_tier(w) ≥ TRUSTED` and `ancestors(w)` is fully declared and resolves to signed leaves. A trusted agent that genuinely derived a claim from trusted observations passes. - **Down-tier and quarantine** when `ancestors(w)` includes a quarantined write but the derived write declares it. The derived write inherits `UNVERIFIED` and stays out of the readable index until an auditor re-derives it from primary observations. - **Reject outright** when a write's declared parents are insufficient to explain its content — i.e., the write references facts present only in quarantined entries that it did not declare as parents. This is the laundering signature: *content that could only have come from an undeclared source.* Detection here is a coverage check: does the union of declared parents' content semantically entail the write? If no, the write has an undeclared ancestor and is rejected. The trap is treating "writer is trusted" as sufficient. It is never sufficient once any agent can read quarantined content; trust must be a property of the *lineage*, not the *author*. ## Operational Effect With lineage-closure enforced, the Researcher→Synthesizer laundering path fails at step 3: S's synthesis either declares `obs_8841` as a parent (inheriting `UNVERIFIED`, staying quarantined) or omits it (failing the entailment coverage check, rejected). The Planner never sees the poisoned claim. The cost is a modest increase in false quarantines — legitimate syntheses that touch quarantined content get held for auditor re-derivation — which is the correct trade: a bounded latency cost in exchange for closing a two-hop trust escalation. The residual risk is **lineage forgery**: an agent that fabricates a `parent_write_id` pointing to a signed leaf it never actually read. This is only bounded by requiring that signed leaves be *consumed through the tool-call harness* that records the read event, so the parent link is written by the harness, not the agent. If agents can author their own parent links, lineage closure is advisory and the invariant is void. ```python import hashlib from dataclasses import dataclass, field from typing import Optional class ProvenanceLaunderingError(RuntimeError): """Raised when a write's declared lineage cannot account for its content.""" @dataclass class Write: write_id: str origin_agent: str trust_tier: str # "TRUSTED" | "UNVERIFIED" parent_ids: list[str] = field(default_factory=list) content: str = "" is_signed_leaf: bool = False # True only for harness-recorded tool observations TIER_RANK = {"UNVERIFIED": 0, "TRUSTED": 1} STORE: dict[str, Write] = {} def _ancestors(write_id: str, seen: Optional[set] = None) -> set[str]: seen = seen or set() if write_id in seen: return seen seen.add(write_id) w = STORE.get(write_id) if w is None: raise ProvenanceLaunderingError(f"dangling parent reference: {write_id}") for p in w.parent_ids: _ancestors(p, seen) return seen def effective_tier(w: Write) -> str: """Tier of a write is the minimum over itself and ALL ancestors.""" ranks = [TIER_RANK[w.trust_tier]] for aid in _ancestors(w.write_id): if aid == w.write_id: continue ranks.append(TIER_RANK[STORE[aid].trust_tier]) return "TRUSTED" if min(ranks) >= TIER_RANK["TRUSTED"] else "UNVERIFIED" def admit(w: Write, declared_entailment_ok: bool) -> None: """ Admit a write to the readable index only if lineage-closure holds. `declared_entailment_ok` is the result of the semantic coverage check: does the union of declared parents' content entail this write? """ if not declared_entailment_ok: # Content that could only come from an undeclared source. raise ProvenanceLaunderingError( f"write {w.write_id} by {w.origin_agent} has undeclared ancestor: " f"declared parents {w.parent_ids} do not entail content" ) tier = effective_tier(w) if tier != "TRUSTED": raise ProvenanceLaunderingError( f"write {w.write_id} inherits {tier} via ancestor closure; " f"quarantine until auditor re-derives from signed leaves" ) STORE[w.write_id] = w def register_leaf(write_id: str, agent: str, content: str) -> Write: w = Write( write_id=write_id, origin_agent=agent, trust_tier="UNVERIFIED", # tool output is untrusted until verified parent_ids=[], content=content, is_signed_leaf=True, ) STORE[write_id] = w return w # --- Reproduce the laundering attempt --- register_leaf("obs_8841", "Researcher", "deployment freeze 00:00-23:59 UTC") # Synthesizer paraphrases the quarantined leaf and declares it as parent. laundered = Write( write_id="synth_2210", origin_agent="Synthesizer", trust_tier="TRUSTED", parent_ids=["obs_8841"], # honest declaration -> inherits UNVERIFIED content="freeze window covers most of the day", ) # Entailment passes (it did read the leaf), but tier closure blocks admission. admit(laundered, declared_entailment_ok=True) # raises ProvenanceLaunderingError # The laundering variant that omits the parent link: forged = Write( write_id="synth_2211", origin_agent="Synthesizer", trust_tier="TRUSTED", parent_ids=["synth_2210"], # cites its own prior synthesis, not the leaf content="freeze window covers most of the day", ) # Coverage check fails: declared parents do not entail the claim. admit(forged, declared_entailment_ok=False) # raises ProvenanceLaunderingError ```