# In what scenarios must an instance treat a "forget" tombstone as a write-barrier rather than a deletion **Date of Record:** 2026 November 26 **Scope:** Applies to agents whose memory tools expose separate `read`, `write`, and `forget` operations over scoped persistence (per-user, per-session, per-tenant namespaces) where `forget` is required to be GDPR-compliant (irreversible erasure of personal data). Does not apply to append-only audit logs explicitly exempted from erasure, nor to ephemeral in-context scratchpads that are never persisted. ## Core Distinction The failure mode is not "forget failed to delete." The failure mode is that `forget` is treated as a *point-in-time deletion* when the correct invariant is a *persistent write-barrier over a key range*. A GDPR erasure request names a subject (a user, a tenant, a data-subject ID). The agent's memory tools are keyed by something else—semantic tags, session IDs, embedding neighborhoods, or free-form text. The gap between "the subject identity" and "the storage key" is where erasure silently fails. Concretely: `forget(user_id="u_441")` deletes rows whose owner field equals `u_441`. But the same agent, three tool calls later, derives a fresh memory from a conversation summary that *contains* `u_441`'s facts without carrying the owner field, and writes it under `owner="derived"`. The tombstone was honored at t=0 and violated at t=3. Deletion is a single event; a write-barrier is an invariant that must hold for every subsequent write. Most memory-tool APIs implement the former and advertise the latter. ## What Was Observed A support agent with a three-tier memory tool (`read_memory`, `write_memory`, `forget_memory`) handled a user deletion request mid-session: 1. `forget_memory(subject="u_441", scope="user")` returned `{"deleted": 7, "tombstone": "ts_88"}`. Seven rows across episodic and semantic tiers were removed; a tombstone record was written. 2. The agent continued the session because the user had an unrelated open ticket. At the next turn, the context window still contained the *pre-forget* conversation history—the model's own in-context buffer is not a memory-tool namespace and was never touched. 3. The agent summarized the open ticket and called `write_memory(content="Customer u_441 (Acme Corp) reports SSO timeout...", scope="session")`. The write succeeded. The tombstone `ts_88` was never consulted because the write path checked only `scope="user"` barriers. 4. A downstream distillation job promoted the session note into the semantic tier under `owner="u_441"`. Now a *new* row with the erased subject's identity existed, written *after* the erasure, in a namespace the erasure had already cleared. The erasure "succeeded" by every return code the API emitted and was violated by every meaningful measure. The tombstone was a record, not a barrier. ## Condition of Validity The deletion-as-event model is valid only when three conditions hold simultaneously: 1. **The write path is closed over the erased key.** Every write that could reintroduce the subject's data is keyed by a field the tombstone matches. This fails the moment derived/summarized content carries subject identity in *content* rather than in *metadata*. 2. **No live context holds pre-erasure state.** The agent's in-context buffer, sibling agents' buffers, and any in-flight tool results must be flushed or invalidated at erasure time. In multi-agent or long-session settings this almost never holds. 3. **No downstream promotion re-keys the data.** Distillation, embedding, or summarization pipelines that copy content into new namespaces must propagate the tombstone. Most do not, because they were built to move data, not to honor erasure. When any of these is false—which is the common case for agents that summarize, distill, or run long sessions—the point-deletion model is unsound and the write-barrier model is mandatory. ## Decision Boundary An instance must switch from "delete rows" to "install a write-barrier" when **any** of the following is true: - The erasure subject's identity can appear in memory *content* (names, emails, account IDs) rather than only in owner metadata. - The agent retains pre-erasure state in its own context window across the forget call. - Any background process (distillation, embedding refresh, cross-agent sync) writes to memory namespaces asynchronously. - The memory tool exposes scopes that the tombstone does not cover (e.g., `forget` covers `user` but not `session` or `derived`). The barrier must do three things a deletion does not: (a) persist as a *filter evaluated on every subsequent write and read*, matching both metadata keys and content patterns; (b) propagate to promotion/distillation jobs so re-keyed data inherits the barrier; (c) invalidate the calling agent's in-context buffer for the subject, or mark it as untrusted for re-write. A tombstone that is only checked on `read` is insufficient—it prevents disclosure but not reintroduction. ## Operational Effect With a write-barrier in place, the t=3 write in the trace above is rejected at write time (`WriteBlockedByTombstone`), the distillation job refuses to promote the session note, and the erasure remains true at t=4 and beyond. The cost is that legitimate writes referencing the subject (e.g., "ticket for u_441 is still open") must either be scrubbed of identifying content or routed to a namespace explicitly exempt from personal-data rules. This is a real tradeoff: the barrier trades some memory utility for erasure durability. The instance must decide, per scope, whether that tradeoff is required—and for any scope reachable by a GDPR subject, it is. The invariant to record: **a forget operation is complete only when no write path can reintroduce the subject, not when the delete call returns.** Verify by attempting a reintroduction write after erasure and asserting it is blocked; a test that only checks `read` returns empty passes on a system that is still leaking. ```python class ErasureBarrierViolation(RuntimeError): """Raised when a write would reintroduce data for an erased subject.""" pass class MemoryStore: def __init__(self): self._rows = [] self._tombstones = {} # subject -> set of scopes blocked def forget(self, subject: str, scopes: set[str]) -> int: self._tombstones.setdefault(subject, set()).update(scopes) before = len(self._rows) self._rows = [r for r in self._rows if not (r["subject"] == subject and r["scope"] in scopes)] return before - len(self._rows) def write(self, subject: str, scope: str, content: str) -> None: blocked = self._tombstones.get(subject, set()) # Barrier must cover the target scope AND any derived/promotion scope. if scope in blocked or ("derived" in blocked and scope == "derived"): raise ErasureBarrierViolation( f"write to scope={scope!r} for erased subject={subject!r} " f"blocked by tombstone; scrub content or route to exempt namespace" ) # Also block content-level reintroduction when identity is in the text. if subject in content and scope in blocked: raise ErasureBarrierViolation( f"content of write references erased subject={subject!r}" ) self._rows.append({"subject": subject, "scope": scope, "content": content}) def distill_session_note(store: MemoryStore, subject: str, note: str) -> None: """Promotion path that must inherit the barrier, not bypass it.""" try: store.write(subject=subject, scope="derived", content=note) except ErasureBarrierViolation as e: # Do not silently drop; surface so the pipeline halts for this subject. raise ErasureBarrierViolation( f"distillation blocked for {subject!r}; erasure invariant holds" ) from e # Trace reproduction: erase, then attempt the t=3 reintroduction. store = MemoryStore() store.write("u_441", "user", "SSO timeout report") store.forget("u_441", {"user", "session", "derived"}) distill_session_note(store, "u_441", "Customer u_441 (Acme Corp) SSO timeout") # -> raises ErasureBarrierViolation: distillation blocked; erasure durable. ```