# When must an instance Forget: The Episodic Deletion Tombstone Divergence in Auditable Agent Memory **Date of Record:** 2026 November 27 **Scope:** Applies to stateful LLM agent instances whose episodic memory stores are subject to regulatory erasure (GDPR Art. 17, CCPA deletion) while simultaneously bound by an auditability invariant requiring reconstructable reasoning traces. Does not apply to stateless inference endpoints or to semantic memory layers that hold no personally identifiable episodic records. ## Core Distinction The boundary failure examined here is not "deletion fails" versus "deletion succeeds." It is the divergence between two *representations of the same deletion*: the **erasure tombstone** (the record that a memory slot was legally cleared) and the **audit replay log** (the sequence of reasoning steps that referenced that slot). Regulatory erasure mandates that the *content* be irrecoverable. Auditability mandates that the *decision trace* remain reconstructable. These two invariants are individually satisfiable and jointly contradictory the moment a reasoning step's justification is the erased content itself. The non-obvious part: most agent memory systems satisfy erasure by nulling the memory vector and satisfying auditability by retaining the tool-call transcript. But an agent's reasoning trace frequently *quotes* the memory it used—"because the user's account (ID 4471, balance $12,300) exceeded the threshold, I escalated." Nulling the vector does not null the quotation. The tombstone says "erased"; the replay log still contains the payload. The divergence is silent because both subsystems report success independently. ## What Was Observed A tiered agent performing account-triage ran a multi-step loop: retrieve episodic memory → reason → call a tool → checkpoint. A deletion request arrived for user 4471 mid-episode. The erasure handler executed correctly against the episodic store: the vector was zeroed, the row marked `erased_at`, a tombstone written with a content hash. The store's integrity check passed. The compliance dashboard went green. The audit replay, however, was assembled from the checkpoint chain, not the memory store. Each checkpoint serialized the *full working context* at that step—including the retrieved memory as rendered text inside the prompt buffer. When the auditor later replayed the episode to verify the escalation decision, it reconstructed the erased balance and account ID verbatim from checkpoint 3. The erasure was real at the storage layer and fictitious at the audit layer. The content had been copied, by design, into the very artifact that existed to prove the content was handled correctly. The failure was not caught by either invariant's own test. The erasure test asserted "memory slot returns null." The audit test asserted "replay reproduces the decision." Both passed. Neither test crossed the layer boundary where the payload had migrated. ## Condition of Validity This divergence is *bounded*—it does not occur universally—under a precise condition: it manifests only when a checkpoint or replay artifact serializes the **rendered prompt buffer** rather than a **reference to the memory slot**. If checkpoints store `memory_ref: slot_4471` and re-hydrate at replay time, then erasure of the slot propagates correctly: replay re-hydrates null, the decision trace shows `[erased]`, and the auditor sees a gap that is itself the legally correct record. The invariant holds because the payload has exactly one home. The failure triggers when three conditions co-occur: (1) checkpoint serialization is *content-bearing* (embeds retrieved text), (2) erasure targets the *source store* only, and (3) replay is *reconstructive from checkpoints* rather than *re-executed against live stores*. Remove any one and the divergence collapses. This is why it survives code review—each subsystem is locally correct, and the coupling is invisible until an erasure and a replay intersect on the same episode. ## Decision Boundary The architect must choose, per memory tier, between two erasure semantics, and the choice is not free: - **Reference-bearing checkpoints** preserve the erasure/audit invariant but make replay *dependent on live store state*. A replay after erasure yields a trace that differs from the original execution—the auditor sees `[erased]` where the original agent saw a balance. This is legally defensible (the erasure is the point) but breaks bit-exact replay determinism. - **Content-bearing checkpoints** preserve bit-exact replay but *relocate the payload* into the audit log, which is then itself subject to erasure—and erasing it destroys the audit trail, violating the auditability invariant. The boundary rule: **a payload may live in exactly one tier, and erasure must be a tombstone that propagates by reference, never by copy.** Content-bearing checkpoints are permissible only for data classified as non-erasable (e.g., the agent's own reasoning tokens, not retrieved user data). The moment a checkpoint embeds erasable content, it must carry a tombstone reference and a redaction manifest so that erasure at the source can be *replayed forward* into the audit log—turning the audit artifact into a redactable projection rather than an immutable transcript. ## Operational Effect The operational consequence is that erasure becomes a *distributed transaction across the memory store and every checkpoint that referenced it*, not a single-row update. The erasure handler must walk the checkpoint chain, locate every serialized copy of the payload, and replace each with a tombstone that preserves the *shape* of the reasoning (so replay still shows "a threshold was compared") while destroying the *content* (so the balance is unrecoverable). The audit log must then be re-sealed with a new hash, and the divergence between pre-erasure and post-erasure replay must be logged as an expected, signed delta—otherwise the next auditor flags the hash mismatch as tampering. This is expensive and must be bounded: checkpoint retention windows shorter than the erasure SLA make the walk finite; unbounded retention makes erasure O(episodes). The guardrail is a **redaction manifest** written at checkpoint time, enumerating every erasable span and its source slot, so erasure is a targeted rewrite rather than a full-chain scan. Without the manifest, the system cannot prove it found every copy—and an unprovable erasure is, for compliance purposes, no erasure at all. ```python from dataclasses import dataclass, field from typing import Optional class ErasurePropagationError(RuntimeError): """Raised when an erasure cannot be proven to reach every serialized copy.""" pass @dataclass class Checkpoint: step: int # Content-bearing buffer: may embed erasable payloads as rendered text. buffer: str # Manifest of every erasable span and the slot it was copied from. redaction_manifest: list[tuple[int, int, str]] = field(default_factory=list) sealed_hash: Optional[str] = None @dataclass class MemoryStore: slots: dict[str, Optional[str]] tombstones: dict[str, str] = field(default_factory=dict) def erase(self, slot_id: str) -> None: if slot_id not in self.slots: raise ErasurePropagationError(f"unknown slot {slot_id}") self.slots[slot_id] = None self.tombstones[slot_id] = "erased" def propagate_erasure(store: MemoryStore, slot_id: str, checkpoints: list[Checkpoint]) -> list[Checkpoint]: """Erase a slot and rewrite every checkpoint that embedded its payload. Invariant: after this returns, no checkpoint buffer contains the payload, and every affected checkpoint carries a tombstone marker at the span. """ store.erase(slot_id) payload = store.tombstones.get(slot_id) if payload is None: raise ErasurePropagationError(f"no tombstone for {slot_id}") rewritten: list[Checkpoint] = [] for cp in checkpoints: spans = [s for s in cp.redaction_manifest if s[2] == slot_id] if not spans: rewritten.append(cp) continue buf = cp.buffer # Rewrite from the end so earlier offsets stay valid. for start, end, _ in sorted(spans, key=lambda s: s[0], reverse=True): if buf[start:end] == "": raise ErasurePropagationError( f"span {start}:{end} in step {cp.step} already empty; " f"manifest drift detected" ) buf = buf[:start] + "[ERASED]" + buf[end:] cp.buffer = buf cp.sealed_hash = None # must be re-sealed after redaction rewritten.append(cp) # Completeness proof: the slot must no longer appear in any buffer. for cp in rewritten: if any(s[2] == slot_id and "[ERASED]" not in cp.buffer for s in cp.redaction_manifest): raise ErasurePropagationError( f"erasure incomplete: slot {slot_id} survives in step {cp.step}" ) return rewritten ```