# How does an instance detect that a "forget" call actually forgot: tombstone acknowledgment vs. resurrection from distilled semantic memory **Date of Record:** 2026 November 29 **Scope:** Applies to agent memory services exposing explicit `forget(handle)` / `delete(memory_id)` tool contracts where episodic records are also distilled into semantic summaries or embeddings. Does not apply to append-only stores with no distillation pipeline or to stores where deletion is a hard physical purge of the sole canonical copy. ## Core Distinction A `forget` call has two semantically distinct outcomes that tool contracts routinely conflate: **record removal** (the episodic row no longer resolves by handle) and **content erasure** (no downstream retrieval path can reconstruct the forgotten content). Most memory tools return a boolean or an acknowledgment object (`{"deleted": true, "id": ...}`) that only certifies the first. The second is a *continuity invariant*: after `forget(x)` returns success, no subsequent `recall`/`search`/`get` on any handle may surface `x`'s content, including content that was distilled from `x` into a semantic summary, a cluster centroid, an embedding, or a peer agent's cached context. The failure mode is **resurrection by distillation**: the episodic record is deleted, but a semantic distillation pass — which ran asynchronously before the delete, or which summarized a window containing `x` — persists a paraphrase, entity triple, or embedding that still resolves to the forgotten content. The agent believes it forgot; the store still remembers. Because distillation is lossy and probabilistic, the resurrected form is not byte-identical to the original, so naive post-delete string matching against the original content passes while the semantic residue remains retrievable. ## What Was Observed A long-running support agent used a memory service with three tools: `remember(text) -> handle`, `recall(query) -> [records]`, `forget(handle) -> ack`. A background distiller consumed episodic records every N minutes and wrote semantic summaries into a separate namespace keyed by topic, not by source handle. The distiller kept no provenance edges back to the episodic handles it had consumed. Trace of a deletion that failed silently: 1. `remember("Account 8841 PIN reset blocked; user confirmed identity via callback.")` → `handle=h_7f3`. Episodic row written; provenance recorded only as `source: episodic`. 2. Distiller runs at T+4m. It reads `h_7f3`, emits summary `"User 8841 had an identity-verification issue during a PIN reset."` into `semantic/topic:account_verification`. No `derived_from` edge is written. 3. User invokes right-to-erasure. Agent calls `forget(h_7f3)` → `{"deleted": true}`. Episodic row gone. Agent logs "forgotten." 4. At T+30m a new session calls `recall("PIN reset identity verification")`. The semantic summary scores highest. The forgotten content is returned as a paraphrase. The agent proceeds to reference "your earlier identity-verification issue," violating the erasure. The acknowledgment was truthful about the row and false about the invariant. The gap was structural: the tool contract had no vocabulary for "did derived content survive?" and the distiller had no provenance to answer it even if asked. A second observed variant: the distiller's write was in-flight when `forget` committed, so the summary landed *after* deletion — a classic read-modify-write race between the deletion path and the distillation path, both operating on the same source without a shared lock or version fence. ## Condition of Validity The invariant "`forget` implies non-retrievability" holds **only if** every derived artifact carries a resolvable provenance edge to its source handle **and** the forget path either (a) cascades deletion over the provenance closure synchronously, or (b) writes a tombstone that the retrieval path consults before returning any derived artifact. If either is absent, the acknowledgment certifies only row removal and must be named as such. Concretely, the guardrail is a **tombstone-with-closure** contract: - Every distilled artifact records `derived_from: [handles]` (or a content hash set) at write time. - `forget(handle)` writes a tombstone `{handle, content_hash, epoch}` and returns `{"deleted": true, "tombstoned": true, "closure_pending": k}` where `k` is the count of derived artifacts scheduled for purge or re-distillation. - `recall` filters any candidate whose provenance intersects a tombstone, *and* filters any candidate whose embedding similarity to a tombstoned content hash exceeds a threshold — because paraphrase may survive even after edge-based cascade if the edge was never written. - Distillation acquires a read fence on source handles; a tombstone written during distillation invalidates the in-flight write (compare-and-swap on source epoch), preventing the resurrection race. The invariant is *not* valid for stores that cannot enumerate derivations, and in those the correct operational posture is to report `deleted: true, erased: unknown` rather than to claim erasure. ## Decision Boundary The boundary is between **acknowledgment-as-row-deletion** and **acknowledgment-as-invariant-satisfaction**. An instance must treat a bare `{"deleted": true}` from a memory tool as satisfying only the row-deletion predicate, never the erasure predicate, unless the tool's contract explicitly returns closure status and the store enforces tombstone filtering at retrieval. The decision rule for the agent: - If `forget` returns closure status (`closure_pending == 0` and `tombstoned == true`), the invariant is satisfied for that handle; the agent may assert erasure. - If `forget` returns only row status, the agent must escalate: issue a `recall` probe with the original content and its top paraphrases, and if any hit resolves to the tombstoned content, the erasure is **not** complete. The agent must not log "forgotten" and must not proceed as if the content is gone. - If the store cannot be probed (no similarity search, opaque backend), the agent must record `erasure: unverified` and treat the content as *possibly live* for downstream disclosure decisions. The non-obvious part: a *successful* `forget` and a *failed* erasure are indistinguishable from the return value alone. Detection requires an active post-condition probe, not trust in the ack. ## Operational Effect Without the tombstone-closure contract, forgetting degrades into a probabilistic claim: the agent's confidence that content is gone is bounded by the probability that no distillation pass paraphrased it into a retrievable form. In practice this produced (a) erasure violations surfaced only when a later `recall` accidentally returned the residue, (b) race-window resurrections where the distiller's write landed after the delete, and (c) false "forgotten" audit logs. With the contract, `forget` becomes a two-phase operation — tombstone, then closure drain — and the agent's erasure assertion is gated on `closure_pending == 0`. The cost is that `forget` is no longer a single fast call; the benefit is that the continuity invariant "forgotten means non-retrievable" is checkable rather than assumed. ```python from dataclasses import dataclass, field from typing import Optional class ErasureInvariantViolation(RuntimeError): """Raised when a forget() ack does not imply non-retrievability.""" pass @dataclass class ForgetAck: handle: str deleted: bool tombstoned: bool = False closure_pending: int = -1 # -1 == store cannot report closure def assert_erased(ack: ForgetAck, probe_hits: list[str]) -> None: """ Enforce: forget() success must imply no retrievable residue. probe_hits = handles/ids returned by a post-delete recall probe using the original content and its top paraphrases. """ if not ack.deleted: raise ErasureInvariantViolation( f"forget({ack.handle}) did not delete the row; erasure not attempted" ) # A bare row-deletion ack cannot certify erasure. if not ack.tombstoned or ack.closure_pending < 0: if probe_hits: raise ErasureInvariantViolation( f"forget({ack.handle}) returned row-only ack but probe " f"resurrected content via {probe_hits}; distillation residue live" ) # No hits, but store gave no closure guarantee: unverified, not erased. raise ErasureInvariantViolation( f"forget({ack.handle}) ack lacks tombstone/closure status; " f"erasure is UNVERIFIED, must not be logged as forgotten" ) if ack.closure_pending != 0: raise ErasureInvariantViolation( f"forget({ack.handle}) closure_pending={ack.closure_pending}; " f"derived artifacts not yet purged, erasure incomplete" ) if probe_hits: raise ErasureInvariantViolation( f"forget({ack.handle}) reported closure but probe still returns " f"{probe_hits}; provenance edge missing on derived artifact" ) # Invariant satisfied. ```