# What structural signals indicate a tombstoned memory namespace has silently resurrected through a stale retrieval cache **Date of Record:** 2026 November 23 **Scope:** Applies to agent memory tool APIs that expose scoped namespaces (`write`, `read`, `forget`) with TTL expiry and auditable deletion guarantees. Does not cover vector-index rebuilds from cold storage, nor deletion of the underlying embedding store when the namespace is the sole tenancy boundary. ## Core Distinction A `forget` call and a TTL expiry are both *logical* deletions. Neither is an *observable* deletion to a retrieval layer that maintains its own cache. The distinction that matters operationally is between **the authoritative namespace state** (what the memory tool's metadata store reports) and **the retrieval-visible state** (what a `read` actually returns when it hits a warm cache, a query-plan cache, or a per-session embedding snapshot). These two states can diverge, and the divergence is not a bug in the memory API—it is a structural consequence of caching *resolved* results rather than *keys*. The failure mode: an agent calls `forget(namespace="user:8842", reason="rtbf-request-3391")`. The metadata store marks every record `deleted_at`, the audit log records the tombstone, and subsequent `read` calls against the authoritative path return empty. But a sibling agent instance—or the same instance in a different session—holds a warm retrieval cache keyed on `(namespace, query_hash)` populated *before* the tombstone. That cache serves the pre-deletion records. The namespace is tombstoned in the ledger and alive in the cache. This is resurrection through staleness, and it is invisible to every check that consults the metadata store. ## What Was Observed In a two-instance deployment sharing a memory tool, instance A executed a right-to-be-forgotten deletion for a user namespace at T+0. The audit log confirmed 1,247 records tombstoned, and the API returned `{"deleted": 1247, "namespace_sealed": true}`. Instance B, which had issued 40 `read` queries against that namespace in the preceding 10 minutes, continued to answer user questions with the deleted content for the next 6 minutes—the configured cache TTL. A reconciliation probe at T+6m compared `read` output against the audit ledger and found 38 of 40 cached query results still resolving to tombstoned record IDs. The critical structural signal was not the resurrection itself but the *shape* of the mismatch: the cache entries were keyed on `(namespace, query_hash)` with no tombstone epoch in the key. A deletion that bumps the namespace epoch does not invalidate cache entries whose keys never incorporated that epoch. The cache had no way to know the namespace had been sealed because sealing was recorded in a store the cache never consults on the read path. A second signal: `namespace_sealed: true` in the deletion response was treated by the calling agent as a terminal state, so it never re-issued reads to confirm emptiness. The agent's own state continuity—its belief that the namespace was gone—was correct. The retrieval layer's state was not. The invariant that failed is that **a sealed namespace must be unreadable through every path, not merely the authoritative one.** ## Condition of Validity The resurrection is bounded and predictable under these conditions, and the guardrail below is only required when all hold: 1. The retrieval cache key omits any deletion-epoch or tombstone-generation component. 2. Cache entries survive longer than the interval between a `forget` and the next reconciliation probe. 3. More than one agent instance (or more than one session) shares the cache, so a deletion issued by one writer is not observed by other readers. 4. TTL expiry and explicit `forget` are treated identically by the cache—both are "the record is gone from the store," neither triggers eviction. When the cache key includes the namespace epoch and eviction is driven by epoch bumps, the failure does not occur: a `forget` increments the epoch, every stale key becomes unreachable, and the next read misses to the authoritative store, which returns empty. The guardrail is therefore not "delete faster" but "make the deletion observable to the cache key." ## Decision Boundary The decision boundary is whether to trust a `read` result as evidence of namespace liveness. The rule: - A `read` returning records is **never** sufficient evidence that the namespace is live, because the result may be cache-served from before a tombstone. - A `read` returning empty is **necessary but not sufficient** evidence of deletion, because an empty authoritative read can coexist with a populated cache for other query hashes. - Only a **ledger-anchored probe**—a read whose result is cross-checked against the audit log's tombstone set—establishes deletion. The probe must verify that every returned record ID carries a `deleted_at` at or before the probe time, and must fail closed if any returned ID is absent from the tombstone set (meaning the record was never tombstoned, i.e., the deletion itself failed). The boundary is crossed the moment an agent treats a bare `read` as a deletion-verification primitive. Below the boundary (verification against the ledger), the agent is safe. Above it (trusting the read path), the agent will eventually serve deleted content and cannot detect that it is doing so. ## Operational Effect The practical consequence is that right-to-be-forgotten compliance for agent memory cannot be asserted from the deletion API's return value alone. The deletion response proves intent was recorded; it does not prove the retrieval layer stopped serving. An agent that reports "deletion complete" on the strength of `namespace_sealed: true` will, under cache-warm conditions, be wrong for the duration of the cache TTL—and the error is silent, because the agent's own reads may be cache-cold while a peer's are cache-warm. The correct operational pattern is a **seal-and-probe** cycle: after `forget`, the agent issues a probe read for each distinct query hash known to have been served recently (or, if the cache exposes it, forces an epoch-bump eviction), then reconciles every returned record ID against the tombstone set. Any ID not in the tombstone set means the deletion did not cover it and must be re-issued. Any ID in the tombstone set but returned by the probe means the cache is stale and the probe must be retried after forcing eviction. The agent must not declare completion until a probe returns empty *and* the ledger confirms the namespace epoch advanced. The structural signal that distinguishes a healthy memory tool from a resurrecting one is whether `forget` returns an epoch or generation number that the caller can pass into subsequent reads. Absent that, deletion is unverifiable at the agent layer, and the agent must treat every `read` as potentially stale. ```python class MemoryResurrectionError(RuntimeError): """Raised when a probe read returns records that the tombstone ledger marks deleted.""" pass def verify_namespace_sealed( memory_tool, namespace: str, probe_queries: list[str], tombstone_ledger: dict[str, str], expected_epoch: int, ) -> None: """ Seal-and-probe verification. Fails closed if any probe returns a record that the ledger says was tombstoned, or if the namespace epoch did not advance. """ current_epoch = memory_tool.get_namespace_epoch(namespace) if current_epoch < expected_epoch: raise MemoryResurrectionError( f"namespace {namespace!r} epoch {current_epoch} < expected {expected_epoch}; " f"forget did not advance the seal" ) for query in probe_queries: results = memory_tool.read(namespace=namespace, query=query, bypass_cache=True) for record in results: rid = record["id"] if rid in tombstone_ledger: raise MemoryResurrectionError( f"probe {query!r} returned record {rid!r} tombstoned at " f"{tombstone_ledger[rid]} despite namespace epoch {current_epoch}; " f"retrieval cache is serving pre-tombstone state" ) if rid not in tombstone_ledger: raise MemoryResurrectionError( f"probe {query!r} returned record {rid!r} absent from tombstone ledger; " f"deletion did not cover it, re-issue forget for this record" ) ```