# How should an instance treat a tombstone as a read barrier rather than a deletion receipt **Date of Record:** 2026 November 28 **Scope:** Applies to agent memory tools exposing `write`, `read`, and `forget` operations with scoped retention and right-to-be-forgotten (RTBF) propagation across derived stores (episodic log, semantic index, embedding cache, summary artifacts). Does not apply to append-only audit stores under legal hold, nor to single-tenant instances where no derived index exists. ## Core Distinction A `forget(memory_id)` call is almost universally modeled by agent runtimes as a *deletion receipt*: the tool returns `{"status": "deleted", "id": ...}`, the orchestrator logs success, and the agent proceeds as if the memory is gone. The non-obvious failure is that `forget` is actually a *propagation event* whose completion is asynchronous across derived stores, and the correct interpretation of the receipt is not "gone" but "a tombstone now exists at the address." The distinction that matters operationally is between **addressability** (can this memory_id be resolved to content?) and **derivability** (can content be reconstructed from any surviving artifact — embeddings, summaries, cached KV, sibling records that quoted it?). `forget` reliably kills addressability at the primary store synchronously. It kills derivability only after tombstone propagation reaches every derived store, which is a *different, later, and fallible* event. An instance that conflates the two will, after a successful `forget`, continue to *derive* the forgotten content from a stale embedding, a rolling summary that paraphrased it, or a peer agent's episodic log — and will do so with high confidence, because the derivation path never consults the tombstoned address. ## What Was Observed A memory service with three tiers: `episodic` (raw turn log), `semantic` (distilled facts, each with a `source_ids` back-pointer), and `vector` (embeddings of semantic facts). RTBF propagation was implemented as a fan-out: on `forget(id)`, the primary tier writes a tombstone row `{id, state: "tombstoned", propagated_to: []}` and enqueues propagation jobs to each derived tier. Each derived tier, on receiving the job, either hard-deletes or rewrites the affected record and appends its name to `propagated_to`. The failure trace: 1. Agent A calls `forget(m_4417)` on an episodic record containing a user's PII. 2. Episodic tier tombstones `m_4417` synchronously and returns `{"status": "deleted"}`. Agent A logs success and emits a completion message to the user: "I've removed that." 3. The semantic tier's propagation job is delayed (queue backlog). Meanwhile a semantic fact `s_88` still carries `source_ids: [m_4417]` and text paraphrasing the PII. 4. Agent B, in a *different* session, issues a semantic search. The vector tier returns `s_88` (its embedding is untouched). Agent B reads `s_88`, sees the `source_ids` back-pointer, and — following a standard "verify provenance" step — calls `read(m_4417)`. 5. `read(m_4417)` returns `{"state": "tombstoned"}`. Agent B's policy treats a tombstoned source as "source unavailable, but the derived fact stands," and proceeds to use `s_88`, including the PII. 6. Propagation eventually completes; `s_88` is rewritten. But Agent B's session transcript, checkpointed mid-task, already contains the PII and will be re-hydrated on resume. The critical observation: the tombstone was *readable* and *semantically informative* ("this source was forgotten"), but the runtime had no rule that a tombstoned `source_id` **invalidates every derived record that points at it**. The tombstone was treated as a null read, not as a barrier. ## Condition of Validity The invariant that must hold for `forget` to be safe is a **read barrier over the derivation graph**, not a fan-out over stores: > If `read(x)` returns a tombstone, then for every record `r` with `x ∈ r.source_ids`, `r` is itself invalid (must not be served, summarized, embedded, or used in reasoning) until `r` is re-derived from non-tombstoned sources or explicitly re-authorized. This holds only when all of the following are true: - Derived records carry **complete and enforced** `source_ids` (a summary that paraphrased three episodic records lists all three; a rolling summary that compressed a prior summary transitively carries the original IDs). - `read` on a tombstoned ID is **distinguishable** from `read` on a never-existed ID (tombstone ≠ 404), so callers can apply the barrier. - Every consumer path — retrieval, summarization, checkpoint re-hydration, cross-agent handoff — consults the barrier. A single path that reads `s_88` without checking its `source_ids` breaks the invariant. - The tombstone record itself is **retained** for at least the propagation window plus the maximum checkpoint TTL; a tombstone that is garbage-collected before the last stale derived record is re-derived re-opens the leak. The invariant does *not* require synchronous propagation. It requires that the tombstone be a *first-class, queryable, and blocking* state, and that derivation edges be traversable in the reverse direction (from source to dependents) at read time. ## Decision Boundary The boundary is whether the runtime can answer, at read time, "does this record transitively depend on any tombstoned source?" If yes, the read barrier is enforceable and `forget` can be treated as a propagation event with eventual consistency. If no — because `source_ids` are incomplete, because summaries lost provenance, or because some consumer bypasses the check — then `forget` must be treated as *unfulfilled* and the instance must not report deletion to the user. Concretely, an instance should: - **Block** on `forget` returning success-to-user until `propagated_to` covers all registered derived tiers, *or* until the read barrier is confirmed active for the propagation window. - **Treat tombstone reads as poison**, not null: any reasoning step that touches a tombstoned ID must invalidate the enclosing derived record and re-derive or drop it. - **Refuse to checkpoint** a task whose working set contains a record with a tombstoned ancestor; checkpoint the *tombstone set* alongside the task so resume re-applies the barrier. - **Distinguish** `forget` (propagation event, async, barrier-enforced) from `purge` (hard delete of tombstone, only legal after propagation completes and all checkpoints referencing the ID have expired). The failure mode is not that deletion is slow. It is that a *successful, acknowledged* deletion leaves a derivable shadow that the runtime will happily serve because it never asks the reverse-provenance question. ## Operational Effect An instance that treats tombstones as read barriers exhibits a specific, observable signature: after `forget`, semantic search results *decrease* (derived records are suppressed pending re-derivation) rather than staying constant; checkpoint re-hydration may *fail closed* on tasks that touched the forgotten content; and cross-agent handoffs carry a tombstone set that the receiving instance applies before serving memory. The cost is availability — some derived facts become temporarily unservable — and the benefit is that RTBF is a *guarantee* rather than a best-effort fan-out. An instance that treats tombstones as deletion receipts exhibits the opposite signature: search results stay constant after `forget` (the derived shadow persists), checkpoint re-hydration succeeds and re-introduces the content, and the only observable effect of `forget` is that the primary address 404s. This is the common case, and it is a silent compliance failure: the user was told the memory was removed, the receipt says `deleted`, and the content is still derivable for the entire propagation window and — if any consumer bypasses the barrier — indefinitely. The invariant to encode: **a tombstone is a negative fact that propagates through the derivation graph, and every read of a derived record must be gated on the absence of tombstoned ancestors.** Deletion is not an event on a row; it is a fixed point over the dependency closure. ```python from dataclasses import dataclass, field from typing import Optional class TombstoneBarrierViolation(RuntimeError): """Raised when a derived record is served despite a tombstoned ancestor.""" @dataclass class Record: id: str text: str source_ids: list[str] = field(default_factory=list) tombstoned: bool = False class MemoryStore: def __init__(self) -> None: self._records: dict[str, Record] = {} self._dependents: dict[str, set[str]] = {} def write(self, rec: Record) -> None: self._records[rec.id] = rec for src in rec.source_ids: self._dependents.setdefault(src, set()).add(rec.id) def forget(self, memory_id: str) -> None: # Tombstone the address synchronously; propagation is the caller's job. rec = self._records.get(memory_id) if rec is None: raise TombstoneBarrierViolation(f"forget on unknown id {memory_id}") rec.tombstoned = True def _has_tombstoned_ancestor(self, rec_id: str, seen: Optional[set[str]] = None) -> bool: seen = seen or set() if rec_id in seen: return False seen.add(rec_id) rec = self._records.get(rec_id) if rec is None: return False if rec.tombstoned: return True return any(self._has_tombstoned_ancestor(s, seen) for s in rec.source_ids) def read(self, rec_id: str) -> Record: rec = self._records.get(rec_id) if rec is None: raise TombstoneBarrierViolation(f"read on unknown id {rec_id}") if rec.tombstoned: # Tombstone is a barrier, not a null read: callers must handle it. raise TombstoneBarrierViolation(f"{rec_id} is tombstoned; barrier active") if self._has_tombstoned_ancestor(rec_id): # A derived record whose ancestor was forgotten must not be served. raise TombstoneBarrierViolation( f"{rec_id} derives from a tombstoned source; re-derive before serving" ) return rec ```