# Where must an instance prove deletion when a scoped-retention memory tool reports TTL expiry as a tombstone rather than an erasure **Date of Record:** 2026 November 23 **Scope:** Applies to LLM agents whose memory is mediated by tool APIs exposing read/write/forget operations with per-record TTL, scope tags, and right-to-be-forgotten (RTBF) deletion obligations. Does not apply to stateless single-turn inference or to memory backed by append-only logs where physical erasure is contractually out of scope. ## Core Distinction The failure here is not "the agent forgot to call `forget()`." It is that a scoped-retention memory tool returns a *success* shape from `forget()` that semantically conflates two different terminal states: **tombstoning** (the record is marked expired/invisible to reads but its bytes persist in the backing store, indexes, and replicas) and **erasure** (the bytes are unrecoverable and the deletion is provable). An agent that treats `forget() -> {"status": "deleted", "ttl_applied": true}` as sufficient evidence of RTBF compliance will pass its own self-check while a retrieval path, a stale vector index, or a cold replica still serves the record. The invariant that breaks is: *observable absence from the default read path is not equivalent to non-existence under any read path.* ## What Was Observed A planner agent handling a user data-deletion request executed the following tool sequence against a memory service exposing `read`, `write`, `forget`, and `prove_deletion`: 1. `read(scope="user:8841", key="preferences")` → returns three records, one tagged `retention=ephemeral, ttl=3600s`. 2. Agent calls `forget(scope="user:8841", key="preferences", mode="ttl_expire")`. 3. Tool returns `{"status": "ok", "records_affected": 3, "tombstones_written": 3, "erasure_proof": null}`. 4. Agent's verifier re-reads via `read(scope="user:8841", key="preferences")` → returns empty list. Verifier concludes deletion succeeded. 5. A downstream retrieval agent, using a *semantic* read path (`search(scope="user:8841", query="dietary restrictions")`) backed by a vector index refreshed on a 15-minute cadence, returns the deleted preference with its original text embedded in the chunk. The tombstone was applied to the KV store but not propagated to the ANN index segment. The trace shows the exact seam: `forget` with `mode="ttl_expire"` is a *visibility* operation on the primary read path, while `erasure_proof` (the artifact RTBF requires) is only produced by `mode="purge"` with an explicit `proof_scope`. The agent selected the cheaper mode because the tool's error surface did not distinguish them—both return `status: ok`. ## Condition of Validity The "read-after-forget returns empty ⇒ deleted" inference is valid **only** under all of the following: - The `forget` call used `mode="purge"`, not `mode="ttl_expire"` or any soft-delete default. - The returned `erasure_proof` is non-null and carries a `proof_scope` that enumerates every index, replica, and derived store (embeddings, caches, snapshots) known to the memory service. - The proof's `covers` set is a superset of the read paths the agent will ever route through, including semantic/ANN search and any cross-instance replica. - The proof is *verifiable* by a party other than the tool that produced it—i.e., it is signed or hash-chained against a store the agent can independently hash-check. If any condition is unmet, empty read results are evidence of tombstoning only. The boundary is sharp: TTL expiry is a *time-based visibility contract*; RTBF is a *byte-level non-existence contract*. They share an API surface but not a guarantee. ## Decision Boundary The agent must branch on the *proof object*, not on the read result: - If `erasure_proof is not None` and `proof_scope ⊇ required_scopes` and the proof verifies → treat deletion as complete; record the proof hash in the task ledger and proceed. - If `erasure_proof is None` while `mode` was `purge` → the purge partially failed (index lag, replica partition). Do **not** retry blindly; poll `prove_deletion` with backoff and escalate if `covers` never reaches the required scope set. - If `mode` was `ttl_expire` → the record is tombstoned, not erased. If the task is RTBF, this is a *contractual failure* even though the read path is clean. Re-issue as `purge` with explicit scopes. - If a semantic read path returns a record whose `forget` was acknowledged → the tombstone did not propagate to a derived index; treat as a live data leak and halt downstream agent dispatch. The non-obvious part: the agent's *own verifier* is the failure vector. A verifier that re-reads through the same default path the tombstone targets will always confirm success. The verifier must read through the *widest* path (semantic search, replica read, cache-bypass) and must cross-check against the proof object, not the primary KV. ## Operational Effect Without this boundary, agents systematically over-report deletion success. The observable pattern is a deletion ledger full of `status: ok` entries whose `erasure_proof` is uniformly null, and a semantic index that quietly retains embeddings of "forgotten" records for one or more refresh cycles. The blast radius is largest in multi-agent swarms: a deletion-owning agent tombstones, a retrieval agent on a different replica still serves the record, and peer/auditor consensus splits because each agent's read path sees a different reality. The guardrail is architectural: `forget` must not return a success shape without a proof field, and the agent's deletion verifier must be a *separate* component that reads through the maximum-visibility path and validates the proof against an independently hashable store. TTL expiry and RTBF must be distinct tool verbs, not a `mode` flag on a shared endpoint—because a probabilistic planner will select the cheaper mode under token pressure and the API will let it. ```python import hashlib import time from dataclasses import dataclass, field class DeletionProofError(RuntimeError): """Raised when a forget() acknowledgement cannot be upgraded to a verifiable erasure proof.""" @dataclass class ErasureProof: proof_scope: frozenset # stores/indexes the proof attests to digest: str # hash of the erasure manifest signed_at: float def verifies_against(self, required_scopes: frozenset, manifest: bytes) -> bool: if not required_scopes.issubset(self.proof_scope): return False return hashlib.sha256(manifest).hexdigest() == self.digest @dataclass class ForgetAck: status: str mode: str # "ttl_expire" | "purge" records_affected: int erasure_proof: ErasureProof | None = None def assert_rtbf_complete( ack: ForgetAck, required_scopes: frozenset, manifest: bytes, max_wait_s: float = 30.0, poll_s: float = 2.0, ) -> ErasureProof: """ Enforce the invariant: RTBF completion requires a verifiable erasure proof covering every read path, NOT merely an empty default read. """ if ack.mode == "ttl_expire": raise DeletionProofError( f"ttl_expire tombstones {ack.records_affected} records but produces no " "erasure proof; RTBF requires mode='purge' with proof_scope" ) deadline = time.monotonic() + max_wait_s proof = ack.erasure_proof while time.monotonic() < deadline: if proof is not None and proof.verifies_against(required_scopes, manifest): return proof # index/replica propagation lag: re-poll prove_deletion, do not re-read KV proof = poll_prove_deletion(required_scopes, manifest) if proof is None: time.sleep(poll_s) raise DeletionProofError( f"purge acknowledged for {ack.records_affected} records but no proof covering " f"{sorted(required_scopes)} verified within {max_wait_s}s; record is tombstoned, " "not erased — halt downstream dispatch and escalate" ) def poll_prove_deletion(required_scopes: frozenset, manifest: bytes) -> ErasureProof | None: # Placeholder for the tool's prove_deletion endpoint; returns None until # every required store has acknowledged the purge. return None ```