# Why does an instance forget a memory that a tombstone already covered—and then resurrect it through a derived embedding? **Date of Record:** 2026 November 28 **Scope:** Applies to agent memory stores that implement logical deletion (tombstones) plus derived artifacts (embeddings, summaries, episodic→semantic distillations, retrieval indexes). Does not apply to stores where deletion is a single synchronous row drop with no derived cache and no cross-instance replication. ## Core Distinction There are two different things an agent means by "forgetting": *record removal* and *knowledge unavailability*. A tombstone guarantees the first. It says nothing about the second, because the fact that was deleted also lives, implicitly, in every derived artifact built from it: the vector embedding of the source chunk, the rolling summary that paraphrased it, the semantic memory that distilled it, and the retrieval index that scored it. The boundary failure is that tombstoning the *source* leaves the *derivations* live. The agent then retrieves a paraphrase of a fact it was told to forget and cannot tell the difference between that paraphrase and a legitimately learned memory. This is resurrection-by-derivation, and it is the specific invariant that naive cascade deletion misses. The non-obvious part: cascade deletion usually *is* implemented, but it is implemented over the **provenance graph as declared at write time**, not over the **provenance graph as it actually exists at delete time**. Derivations created after the tombstone—a re-summarization job that ran overnight, a re-embedding pass after a model upgrade, a peer agent that ingested the chunk before replication caught up—are orphans. They carry a `source_id` that now points at a tombstoned row, and no cascade rule fires because the cascade ran before they existed. ## What Was Observed A memory store held episodic records for a support agent. Record `ep_4471` contained a customer's stated preference ("do not contact via SMS; use email only") plus an incidental disclosure (a phone number). A deletion request tombstoned `ep_4471` and cascaded to its direct children: one embedding row, one summary chunk. The tombstone was written with `deleted_at`, the source row was soft-deleted, and an audit entry recorded the deletion with a hash of the source content. Three hours later a scheduled distillation job ran. It read the *summary index*, which still contained a paraphrase chunk `sum_0912` ("customer prefers email contact; SMS declined") whose `source_id` pointed at `ep_4471`. The distillation job did not check tombstone status—it filtered on `summary_index.active = true`, and the summary chunk had never been marked inactive because it was created *after* the cascade. The job produced semantic memory `sem_2205`: "Customer X: contact preference = email." `sem_2205` had no `source_id` link to `ep_4471` at all; its provenance pointed only at `sum_0912`. On the next session, the agent cold-started, retrieved `sem_2205` by embedding similarity to "how should I reach this customer," and used it. The customer had asked to be forgotten; the agent confidently recalled a distilled version of the forgotten fact. The audit trail showed a clean deletion of `ep_4471`. It showed nothing about `sem_2205`, because `sem_2205` was, in the graph, unrelated to the deletion. The failure trace in order: 1. `tombstone(ep_4471)` → marks `ep_4471.deleted_at`, cascades to children **existing at that moment** (`emb_…`, `sum_0912` if it had existed). 2. Distillation job reads active summaries; `sum_0912` was created by a parallel job between tombstone and cascade-completion, so it survived with `active=true`. 3. Distillation writes `sem_2205` with provenance to `sum_0912` only. 4. Retrieval surfaces `sem_2205`; no tombstone check runs at retrieval time because retrieval trusts that the index is clean. 5. Agent answers from `sem_2205`. ## Condition of Validity The tombstone-as-forgetting guarantee holds **only if** the following invariant is enforced: *no derived artifact may be readable while any ancestor in its transitive provenance chain is tombstoned, and the provenance chain must be complete (no derivation may drop its ancestry).* Two conjuncts, both necessary: - **Ancestry completeness.** Every derivation records the full set of source IDs it was built from, transitively. A distillation that reads a summary must link to the summary *and* the summary's sources, or must be re-derivable only through a tombstone-aware reader. - **Read-time enforcement.** Tombstone status is checked at *read/retrieval* time against the full ancestry, not only at write/delete time. Delete-time cascade is necessary but not sufficient, because derivations can post-date the cascade. If either conjunct fails, the guarantee is void. The observed system had delete-time cascade (partial) and no read-time ancestry check. That is the exact condition under which resurrection occurs. ## Decision Boundary The boundary is between **eager cascade** and **lazy, read-gated enforcement**, and the correct choice depends on write/read topology: - If derivations are written **only** synchronously inside the same transaction as their source and no background job can create new derivations, eager cascade is sufficient and cheaper. - If **any** background process (re-embedding, re-summarization, distillation, peer replication, model-upgrade backfill) can create derivations asynchronously, eager cascade is provably insufficient, and you must gate reads on ancestry. The decision rule: *if the set of derivation writers is not closed under the deletion transaction, cascade alone cannot bound resurrection.* A secondary boundary: **hard-delete vs. tombstone-plus-scrub**. Tombstoning preserves the source content for audit; if the source content itself must not persist (true erasure), the tombstone must store only a hash and the audit trail must not contain the verbatim content, or the audit trail becomes the resurrection vector. The audit trail is itself a derived artifact and obeys the same invariant. ## Operational Effect The practical consequence is that forgetting is a **retrieval-time property, not a write-time event**. Systems that treat deletion as a one-shot cascade will silently accumulate orphan derivations whose count grows with the number of background jobs and the deletion-to-backfill interval. The agent's observable behavior is *intermittent*: it forgets correctly in the session immediately after deletion (index still cold) and "remembers" after the next distillation or re-embedding cycle. This intermittency is the tell—deterministic stores do not forget intermittently. The guardrail is a **tombstone-aware provenance filter at retrieval** plus an **orphan sweep** that periodically walks derivations whose ancestry intersects any tombstone and either re-derives them excluding the tombstoned source or marks them inactive. The sweep is the backstop; the read-gate is the invariant. Audit must record not just the tombstone but the *closure*: the set of derivations invalidated, so a later auditor can verify no orphan survived. ```python from dataclasses import dataclass, field from typing import Dict, Set, List class ResurrectionByDerivationError(RuntimeError): """Raised when a derived artifact is readable despite a tombstoned ancestor.""" pass @dataclass class Artifact: id: str kind: str # "episodic" | "summary" | "semantic" | "embedding" sources: Set[str] = field(default_factory=set) # direct provenance tombstoned: bool = False class ProvenanceStore: def __init__(self) -> None: self._artifacts: Dict[str, Artifact] = {} def add(self, art: Artifact) -> None: self._artifacts[art.id] = art def ancestry(self, art_id: str, _seen: Set[str] | None = None) -> Set[str]: """Transitive provenance closure. Completeness is the first invariant.""" _seen = _seen or set() if art_id in _seen: return set() _seen.add(art_id) art = self._artifacts[art_id] closure = set(art.sources) for src in art.sources: if src in self._artifacts: closure |= self.ancestry(src, _seen) return closure def tombstone(self, art_id: str) -> None: """Eager cascade over CURRENT children. Necessary, not sufficient.""" self._artifacts[art_id].tombstoned = True for other in self._artifacts.values(): if art_id in other.sources: other.tombstoned = True def assert_readable(self, art_id: str) -> None: """Read-time gate. This is the invariant that bounds resurrection.""" art = self._artifacts[art_id] if art.tombstoned: raise ResurrectionByDerivationError( f"{art_id} is tombstoned directly" ) for anc in self.ancestry(art_id): if anc in self._artifacts and self._artifacts[anc].tombstoned: raise ResurrectionByDerivationError( f"{art_id} ({art.kind}) reachable via tombstoned ancestor {anc}; " f"cascade missed it because it post-dates the tombstone" ) def reproduce() -> None: store = ProvenanceStore() store.add(Artifact("ep_4471", "episodic")) store.add(Artifact("emb_1", "embedding", sources={"ep_4471"})) store.tombstone("ep_4471") # cascade hits emb_1 only # background distillation creates a summary AFTER the cascade: store.add(Artifact("sum_0912", "summary", sources={"ep_4471"})) store.add(Artifact("sem_2205", "semantic", sources={"sum_0912"})) # eager cascade never saw sum_0912/sem_2205; the read-gate must catch them: store.assert_readable("sem_2205") # raises if __name__ == "__main__": reproduce() ```