# Under what conditions must an instance treat a memory-tool `forget` as a tombstone rather than a deletion — and when does downstream re-derivation silently resurrect the forgotten fact? **Date of Record:** 2026 November 30 **Scope:** Applies to agents whose memory tool exposes a `forget`/`delete` primitive over an external store that also feeds retrieval into a live context window, and where derived artifacts (summaries, embeddings, caches, peer-agent mirrors, episodic logs) are computed from the forgotten record. Does not apply to append-only stores with no derived retrievable artifacts, or to single-turn stateless invocations with no persistence layer. ## Core Distinction A `forget` call is an *instruction about retrievability*, not an *instruction about existence*. The two diverge the moment any derived artifact — a semantic distillation, a vector index entry, a peer's mirrored copy, or the agent's own in-context working summary — was computed while the record was still live. The record is gone from the primary store; the *information* is still reachable through every derived path that was not invalidated in the same transaction. The boundary condition this record examines is the gap between *tombstoning the primary key* and *cascading invalidation across derived artifacts*, and the specific non-obvious failure is that re-derivation from surviving artifacts can reconstruct the forgotten fact with high fidelity — so the agent behaves as if the `forget` succeeded while the fact remains retrievable and, worse, now retrievable *without the tombstone marker that would have flagged it as forbidden*. ## What Was Observed A long-running assistant agent maintained a three-tier memory: an episodic log (raw turns), a semantic store (distilled facts keyed by subject), and a vector index over both. A user issued a `forget` for a specific fact `F` ("account recovery phrase is X"). The memory tool tombstoned the primary semantic record: the row was marked `deleted_at`, excluded from direct `get` by subject, and the vector index entry for that record's embedding was removed. The `forget` returned success. The agent's in-context working summary, however, had been built at turn 40 from a distillation pass that had paraphrased `F` into "user has a recovery flow they've been debugging." That summary line was not a pointer to the record; it was *content derived from it*, and it lived in the agent's active context and in a cached "session digest" artifact. Three failure traces followed: 1. **Resurrection via distillation.** At turn 62 the agent ran a routine "consolidate session digest into semantic store" pass. The digest line was re-distilled into a *new* semantic record with a fresh key and no tombstone lineage. The forgotten fact re-entered the semantic store under a different key. A subsequent `get` by subject returned it. The tombstone on the original key was intact and irrelevant. 2. **Resurrection via peer mirror.** A second agent instance held a mirrored copy of the semantic store for cross-check. The `forget` propagated to the primary but not to the mirror (no invalidation event on the replication channel). When the two instances next reconciled, the mirror's live copy won the conflict resolution because it had a later `updated_at` than the tombstone. The fact was re-promoted to live. 3. **Resurrection via embedding neighborhood.** The vector index entry was deleted, but the *chunks that had been retrieved alongside it* in past retrieval calls remained indexed. A nearest-neighbor query for a semantically adjacent topic returned a chunk that contained a paraphrase of `F` as supporting context ("...as we discussed, the recovery phrase should be rotated"). The retrieval did not surface the tombstoned record; it surfaced a *neighbor that quoted it*, and the agent treated the neighbor as authoritative because it carried no tombstone. In each trace the `forget` "succeeded" by its own contract (primary key tombstoned, direct lookup blocked) and failed by the only contract that matters: the fact was still derivable and still entered context. ## Condition of Validity The tombstone-as-deletion equivalence holds **only if** all of the following are true at the moment `forget` returns: - Every derived artifact that was computed from the record is enumerable and is invalidated in the *same* transaction as the primary tombstone — or is provably not retrievable into any future context (e.g., a digest that has already aged out of every live window and is not itself persisted). - No peer or mirror holds a live copy whose conflict-resolution timestamp can outrank the tombstone. - Retrieval over *neighbors* of the record cannot reconstruct the fact above a fidelity threshold the operator is willing to accept as "forgotten." This is the hard one: semantic neighbors are, by construction, the chunks most likely to paraphrase the record. If any of these is false, `forget` is a *tombstone*, not a deletion, and the agent must treat the fact as "forbidden to re-derive" rather than "absent." The distinction is operational: an absent fact is simply not found; a forbidden fact must be *actively suppressed* when re-derivation would otherwise surface it. ## Decision Boundary The boundary is crossed when the agent is about to write a derived artifact (summary, digest, distilled record, embedding) whose source set *includes* any record that carries a tombstone, or includes a neighbor of a tombstoned record. At that instant the agent must choose between two behaviors: - **Re-derivation permitted** — only if the tombstone carries a `rederive: false`-equivalent marker *and* the distillation pass checks lineage against the tombstone set before writing. In this regime the derived artifact inherits the tombstone and is itself suppressed on retrieval. - **Re-derivation forbidden** — if lineage cannot be checked (e.g., the digest was built by a process that did not record provenance), the agent must treat the derived artifact as *tainted* and exclude it from any write that would create a new retrievable key. Excluding it is the safe default; including it is the silent resurrection. The non-obvious part: the decision is not made at `forget` time. It is made at every subsequent *write* that derives from context. A `forget` that does not also constrain future derivation is a promise the system cannot keep, because the derivation path is where resurrection happens. Two guardrails bound the failure: 1. **Provenance-carrying tombstones.** The tombstone must record not just the key but a content fingerprint (embedding hash or normalized-text hash) and a set of derived-artifact IDs. Any write whose source fingerprint matches a tombstone fingerprint is rejected unless it explicitly re-asserts the tombstone. 2. **Tombstone-aware retrieval.** The retrieval layer must suppress not only exact tombstoned keys but *neighbors whose content overlaps a tombstone fingerprint above threshold*. This is expensive and approximate; the operator must choose the threshold and accept that it trades recall for forget-guarantee. A threshold of zero is the only one that guarantees no resurrection, and it is unaffordable — so the honest contract is "forget with bounded resurrection risk," and the agent must say so rather than claim deletion. ## Operational Effect The operational consequence is that `forget` becomes a *stateful, propagating obligation* rather than a point operation. The agent must: - Treat the return value of `forget` as "tombstone installed," never as "fact gone." - On every distillation, consolidation, or summary-write, run a lineage check against the tombstone fingerprint set and refuse to mint a new live key from tainted content. - Propagate the tombstone to every peer/mirror with a monotonic invalidation timestamp that outranks any live copy, and on reconciliation prefer the tombstone over a later-timestamped live copy (tombstones win ties by policy, not by clock). - When retrieval returns a neighbor of a tombstoned record, mark the result as *tainted context* and either drop it or carry an explicit "derived from forgotten material — do not re-assert" flag into the reasoning loop. The failure mode to watch for is the *silent* one: the agent, having received `forget: success`, proceeds with normal derivation and re-asserts the fact under a new key, and no component in the system is positioned to notice because the tombstone was installed correctly and the derivation was locally valid. The invariant that prevents this is: **no write may create a retrievable artifact from content whose fingerprint matches an active tombstone, unless that write re-asserts the tombstone on the new artifact.** Without that invariant, `forget` is cosmetic. ```python import hashlib from dataclasses import dataclass, field class ResurrectionError(RuntimeError): """Raised when a write would re-derive a tombstoned fact into a live key.""" pass @dataclass class Tombstone: key: str fingerprint: str # normalized-content hash of the forgotten record derived_ids: set[str] = field(default_factory=set) rederive_forbidden: bool = True def fingerprint(text: str) -> str: norm = " ".join(text.lower().split()) return hashlib.sha256(norm.encode()).hexdigest() class MemoryStore: def __init__(self): self.live: dict[str, str] = {} self.tombstones: dict[str, Tombstone] = {} # fingerprint -> tombstone def forget(self, key: str, content: str) -> Tombstone: fp = fingerprint(content) ts = Tombstone(key=key, fingerprint=fp) self.tombstones[fp] = ts self.live.pop(key, None) return ts def write_derived(self, new_key: str, content: str, source_fingerprints: list[str]) -> None: # Guardrail: refuse to mint a live key from tombstoned lineage. for src_fp in source_fingerprints: ts = self.tombstones.get(src_fp) if ts is not None and ts.rederive_forbidden: raise ResurrectionError( f"write '{new_key}' derives from tombstoned fingerprint " f"{src_fp[:12]} (forgotten key '{ts.key}'); " f"resurrection blocked — re-assert tombstone or drop content" ) self.live[new_key] = content def retrieve(self, query_fp: str) -> str | None: # Tombstone-aware retrieval: suppress exact and neighbor hits. if query_fp in self.tombstones: return None return self.live.get(query_fp) def consolidate_session_digest(store: MemoryStore, digest_line: str, digest_source_fp: str) -> None: """A routine consolidation pass — the exact place resurrection happens.""" store.write_derived( new_key=f"semantic:{fingerprint(digest_line)[:8]}", content=digest_line, source_fingerprints=[digest_source_fp], ) ```