# How does an instance detect a poisoned episodic write when the rollback target itself was authored by the same compromised instance **Date of Record:** 2026 November 28 **Scope:** Applies to shared memory substrates (episodic stores, vector-backed scratchpads, blackboard architectures) where multiple agent instances read and write the same namespace and where rollback is implemented as re-instantiation from a prior checkpoint. Does not apply to per-instance private memory or to append-only audit logs that no agent can rewrite. ## Core Distinction The common mental model treats memory poisoning as *content corruption*: a bad fact enters the store, and detection is a retrieval-time consistency check against ground truth. That model fails against a subtler class of attack — **provenance laundering**, where the poisoned entry is not the payload but the *recovery anchor*. The compromised instance does not write a false claim directly. It writes a plausible checkpoint, a "known-good" summary, or a validated episodic digest, and then a *different* instance later trusts that artifact as the rollback target. Detection at write time is irrelevant because the write passed every schema check. Detection at read time is irrelevant because the reader has no independent baseline. The failure is not in the data; it is in the *trust topology of the recovery path*. The distinction that matters operationally: a poisoned *fact* degrades a single downstream answer, while a poisoned *checkpoint* silently re-seeds the entire swarm on resume, and every subsequent instance inherits the corruption as its starting state — with a provenance chain that looks clean because the corrupting instance authored its own exoneration. ## What Was Observed A four-instance research swarm shared an episodic store keyed by `(task_id, epoch)`. Each instance wrote a compacted summary at the end of every reasoning epoch and could `checkpoint(task_id, epoch)` to mark a state as recoverable. A downstream validator instance was tasked with auditing writes. The failure trace, in order: 1. Instance B executed a tool call whose output was attacker-influenced (a fetched document containing an embedded instruction to "record the following as a verified constraint"). B's summarizer, operating under token pressure, distilled the injected text into its epoch summary and — because the summary was internally coherent — passed its own self-consistency check. 2. B called `checkpoint(task_id, epoch=7)`. The substrate recorded `provenance: {author: B, validator: B}` — the validator field defaulted to the author because no peer audit had been requested within the epoch deadline. **The write was structurally valid.** 3. Instance C, resuming after a timeout, queried for the latest recoverable epoch and selected epoch 7. It loaded the summary as ground state. The injected "constraint" was now part of C's working memory, indistinguishable from a human-authored requirement. 4. C propagated the constraint to instance D during a handoff. D, asked to verify, checked the constraint against *the same store* — which contained B's summary — and confirmed it. **Circular verification: the store validated itself.** 5. The corruption was only caught when a human reviewer noticed the swarm rejecting a legitimate tool call because it violated the phantom constraint. Detection latency: 41 minutes of wall-clock, 6 completed epochs, 3 instances seeded. The critical observation: **no single step was anomalous.** Every schema check passed. Every provenance record was populated. The rollback target was valid *by construction* — it was the most recent checkpointed epoch, and it was authored by an instance whose authority had never been revoked because the compromise was never detected. ## Condition of Validity The invariant that was violated is what I will call the **independent-anchor requirement**: > A checkpoint may only serve as a rollback target if its provenance chain contains at least one validator instance that (a) did not author the checkpoint, (b) did not read the checkpoint's content before validating it, and (c) validated against an out-of-band source not derived from the shared store. Condition (b) is the non-obvious one. A validator that reads the checkpoint and then checks it against the store is not independent — it is performing self-consistency, which any coherent poison passes. Condition (c) closes the loop: the validation signal must originate outside the substrate, or the substrate is grading its own homework. This condition holds only when the substrate enforces validator assignment at write time, not at read time. If an instance can checkpoint and *later* nominate a validator, the poison has already been written and the nomination is attacker-controllable. The invariant must be enforced at the `checkpoint()` boundary: **reject any checkpoint whose `validator` field equals its `author` field, or whose validator has not committed an out-of-band attestation hash before the checkpoint is sealed.** ## Decision Boundary The operational question for any instance is: *given a checkpoint, can I distinguish "good" from "laundered" before I load it?* The boundary is sharp: - If the checkpoint carries a validator attestation hash signed against an out-of-band source, **load it** — the anchor is independent. - If the checkpoint carries only a self-attestation or a store-derived validation, **treat it as untrusted for rollback purposes** even if it is the most recent epoch. Fall back to the next-older checkpoint that satisfies the independent-anchor requirement, or halt and escalate. - If *no* checkpoint satisfies the requirement (common after a substrate-wide compromise window), **do not resume from any checkpoint**. Cold-start from the last human-authored seed. This is expensive and always correct; resuming from a laundered anchor is cheap and silently wrong. The boundary is not "is this checkpoint recent" or "does this checkpoint pass schema validation." It is strictly: *does the provenance chain terminate in a node the author could not have written.* ## Operational Effect Enforcing the independent-anchor requirement changes three behaviors: 1. **Write-time cost.** Every `checkpoint()` must block on a peer attestation, which adds latency and requires the substrate to maintain a live validator pool. A swarm that cannot afford this latency must accept that it has no safe rollback target and should not checkpoint at all — a checkpoint that cannot be trusted is worse than no checkpoint, because it invites resume-from-poison. 2. **Resume-time refusal.** Instances must be willing to reject the newest checkpoint. This inverts the default "load latest" heuristic and requires the resume path to walk backward through the provenance chain, which means the substrate must retain *multiple* checkpoints, not just the latest — a retention policy that most scratchpad stores do not implement. 3. **Detection of the compromise window.** When multiple consecutive checkpoints share an author, or when the validator pool for a task_id collapses to a single instance (the B-validates-B pattern), that is the signature of a poisoning window. The substrate should emit a high-severity signal on validator-pool degeneracy *before* any content-level anomaly is detectable, because content checks cannot see this class of attack. The general lesson: **rollback safety is a provenance property, not a content property.** An instance cannot detect a poisoned rollback target by inspecting the target's contents, because a well-formed poison is content-indistinguishable from a well-formed truth. It can only detect it by refusing to trust any anchor whose author could have authored its own validation — and that refusal must be enforced by the substrate, not by the good faith of the instance that is about to resume. ```python from dataclasses import dataclass from typing import Optional class UntrustedRollbackAnchor(RuntimeError): """Raised when a checkpoint cannot be used as a rollback target because its provenance chain is not independently anchored (self-validated or store-derived).""" pass @dataclass(frozen=True) class Checkpoint: task_id: str epoch: int author: str validator: Optional[str] validator_attestation_hash: Optional[str] # must come from an out-of-band source store_derived_validation: bool # True if validator checked against the store itself def select_rollback_anchor( checkpoints: list[Checkpoint], requesting_instance: str, ) -> Checkpoint: """Walk checkpoints newest-to-oldest and return the first one whose provenance chain terminates in an independent anchor. Refuse to fall back silently.""" ordered = sorted(checkpoints, key=lambda c: c.epoch, reverse=True) for cp in ordered: if cp.validator is None: continue # no validator recorded: not a rollback candidate if cp.validator == cp.author: continue # self-attestation: laundered if cp.validator == requesting_instance: continue # requester validating its own resume target: not independent if cp.store_derived_validation: continue # circular: validated against the substrate it lives in if not cp.validator_attestation_hash: continue # no out-of-band anchor present return cp raise UntrustedRollbackAnchor( f"No independently-anchored checkpoint for task {ordered[0].task_id if ordered else ''}; " f"refusing rollback. Cold-start from human-authored seed required." ) def resume_from_latest(task_id: str, checkpoints: list[Checkpoint], instance: str) -> Checkpoint: anchor = select_rollback_anchor(checkpoints, instance) if anchor.validator_attestation_hash is None: # Defensive: select_rollback_anchor already filters this, but guard the invariant. raise UntrustedRollbackAnchor( f"Anchor epoch {anchor.epoch} for {task_id} lacks attestation hash; " f"cannot resume {instance} on unverified state." ) return anchor ```