# When must an instance refuse a memory erasure it has already acknowledged: the tombstone-ordering invariant across scoped persistence, TTL decay, and GDPR-style forget APIs **Date of Record:** 2026 November 25 **Scope:** Applies to any agent whose memory substrate exposes separate `write`, `read`, and `forget` tool calls with scoped namespaces, per-record TTL, and a hard-erasure (`forget --hard`) contract that must survive replication and episodic-to-semantic distillation. Does not apply to append-only logs with no deletion surface, or to stateless single-turn inference. ## Core Distinction The failure is not "the record wasn't deleted." It is that **the erasure acknowledgement and the physical deletion are two different state transitions, and the agent treats the first as proof of the second.** A `forget` call that returns `{"status":"deleted"}` is a *promise about the logical layer*; the record may still exist in four other places: (1) an unresolved TTL timer that will resurrect a stale copy on the next `read` if the tombstone has not yet propagated, (2) a distilled semantic summary in a parent namespace that was written *before* the erasure and never re-derived, (3) a replica that has not yet seen the tombstone, and (4) the agent's own context window, where the erased value is still a live token span the model can quote. The invariant that bounds this: **a `forget` is only valid when the tombstone's monotonic version is ≥ the version of every derived record that references the erased key, across every scope the agent can read from.** If the agent acknowledges erasure while any derived record has a higher version, the erasure is *observationally reversible* — a subsequent `read` of the parent scope will re-materialize the deleted fact from the summary, and the agent will believe the user's data is gone when it is not. ## What Was Observed A support agent handled a right-to-erasure request for a customer's stored address. The tool sequence: 1. `forget(scope="profile", key="addr", hard=True)` → `{"status":"deleted","tombstone_v":41}` 2. Agent replies to the user: "Your address has been erased." 3. 40 minutes later, the same agent handles an unrelated shipping question. It calls `read(scope="profile_summary")`, which returns a distilled paragraph: *"Customer ships to [REDACTED address], prefers morning delivery."* The summary was written at version 39, **before** the tombstone at v41, and the distillation job had not re-run. 4. The agent quotes the address back into its context to answer the shipping question. The erasure was acknowledged at t=0 and observationally reversed at t=40m. No error was raised. The `forget` API did exactly what it promised at the logical layer; the *distillation lineage* was the unguarded seam. A second observation, same incident: a TTL timer on the `profile` scope had a `reap_at` set for 90 days out. After the hard forget, the reaper still fired a `read` against the key to check liveness before deleting — and because the tombstone had not yet replicated to the reaper's shard, the reaper **re-wrote a tombstone-shadow record** from its local cache. The key came back with `state="reaped"` but `value` populated. The reaper's read was a *resurrection vector*. ## Condition of Validity The erasure contract holds only if all four of the following are true at acknowledgement time: - **Lineage monotonicity:** for every derived record `d` whose `source_keys` contains the erased key, `d.version < tombstone.version`, OR `d` has been invalidated by the same tombstone. The agent must be able to *query* this; if the memory API does not expose `derived_from` edges, the erasure cannot be certified and the agent must downgrade to a soft acknowledgement. - **Tombstone-before-read:** every read path (including TTL reapers, distillation jobs, and replica catch-up) must check the tombstone log *before* serving a value, not after. A reaper that reads-then-checks is a resurrection vector. - **Context scrubbing:** the agent's own context window must be treated as a replica. If the erased value is still in the prompt, the agent will leak it regardless of what the store says. A hard forget requires a context reset or an explicit redaction pass over the active span. - **Idempotent re-acknowledgement:** a second `forget` on an already-tombstoned key must return the *same* tombstone version, not a new one, or downstream lineage checks will mis-order. If any condition is unmet, the correct move is **not** to acknowledge. The agent must either (a) request the distillation invalidation explicitly and wait for its version to advance, or (b) return a *conditional* acknowledgement that names the residual scope. A false acknowledgement is worse than a delayed one: it is a compliance claim the system cannot back. ## Decision Boundary The boundary is between **erasure as a logical event** and **erasure as a physical-and-derived event**. The agent crosses it incorrectly when it treats the `forget` return value as terminal. The safe rule: - If the memory API exposes `derived_from` lineage and a `tombstone_v`, and the agent can verify `max(derived.version) < tombstone_v` for all derived records in all readable scopes → acknowledge unconditionally. - If lineage is exposed but a derived record has a higher version → **do not acknowledge**; issue `forget` against the derived scope first, then re-check. - If lineage is *not* exposed → acknowledge only as `{"erasure":"logical","residual_scopes":["profile_summary","context_window"],"certified":false}`. Never emit a bare "deleted." - If the erased value is still in the active context window → the acknowledgement is invalid until the span is redacted. The model cannot un-see a token. The non-obvious part: **TTL is not an erasure mechanism.** A record with `ttl=90d` that is hard-forgotten still has a live reaper timer that will read the key. TTL decay is a *garbage collection* contract; erasure is a *provenance* contract. Conflating them is how the reaper resurrected the address. ## Operational Effect After adopting the lineage-check-before-acknowledge rule, the agent's erasure path gained a mandatory pre-flight: enumerate derived scopes, compare versions, and only then emit the acknowledgement. Two operational consequences: 1. **Latency:** erasure acknowledgement now takes a round-trip to the distillation index (median +180ms). This is acceptable; a false erasure claim is a regulatory event, not a latency event. 2. **Partial-erasure states become first-class.** The agent now routinely returns `certified:false` with a residual-scope list, and a background job re-runs distillation invalidation. The user-facing message changed from "erased" to "erasure scheduled; derived summaries invalidated at v{N}." This is the honest state. The guardrail is a single invariant enforced at the tool boundary: **no acknowledgement may be emitted whose tombstone version is ≤ any live derived record's version.** The code below enforces it and raises on violation rather than silently downgrading. ```python from dataclasses import dataclass, field from typing import Optional class ErasureLineageViolation(RuntimeError): """Raised when a forget acknowledgement would be observationally reversible.""" pass @dataclass class DerivedRecord: scope: str version: int source_keys: list[str] @dataclass class ForgetResult: key: str tombstone_v: int status: str class MemoryErasureGuard: def __init__(self, lineage_index, context_window_keys): self.lineage = lineage_index # scope -> list[DerivedRecord] self.context_keys = set(context_window_keys) def certify(self, key: str, result: ForgetResult, readable_scopes: list[str]) -> dict: if result.status != "deleted": raise ErasureLineageViolation( f"forget for {key!r} returned status={result.status!r}; cannot certify" ) # Invariant 1: no live derived record may out-version the tombstone. for scope in readable_scopes: for d in self.lineage.get(scope, []): if key in d.source_keys and d.version >= result.tombstone_v: raise ErasureLineageViolation( f"derived record in scope={scope!r} v={d.version} " f">= tombstone_v={result.tombstone_v} for key={key!r}; " f"erasure is observationally reversible" ) # Invariant 2: the erased value must not still be live in context. if key in self.context_keys: raise ErasureLineageViolation( f"key={key!r} still present in active context window; " f"redact before acknowledging" ) return { "erasure": "physical_and_derived", "certified": True, "tombstone_v": result.tombstone_v, "residual_scopes": [], } ```