# When must an instance treat a `forget` acknowledgement as a tombstone rather than a deletion, and why the distinction is the only thing preventing scoped-retention resurrection **Date of Record:** 2026 November 23 **Scope:** Applies to any agent runtime that exposes `read`/`write`/`forget` memory tools with per-scope TTLs and a right-to-forget (RTF) enforcement path, where the agent may hold cached or in-context copies of records it has previously read. Does not apply to stateless single-shot inference with no persistent store, nor to stores where `forget` is implemented as a synchronous hard delete against a single authoritative backend with no derived indexes. ## Core Distinction The failure mode is not "the agent forgot to call `forget`." It is the conflation of two semantically distinct operations that the tool API exposes under one name: 1. **Deletion** — the record no longer exists in any backing store. Any subsequent `read` returns `NOT_FOUND`. There is no resurrection path. 2. **Tombstoning** — the record is marked non-readable at the API surface, but physically persists (or persists in derived artifacts: vector indexes, episodic summaries, KV caches, sibling scopes, in-context copies the agent already holds) until a TTL or compaction sweep reclaims it. A scoped-retention store with TTL semantics almost never implements (1). It implements (2), because TTL expiry and RTF share the same reclamation machinery, and reclamation is asynchronous. The `forget` call returns `{"status": "forgotten"}` — an acknowledgement of *intent registration*, not of *physical erasure*. An instance that treats that acknowledgement as proof of deletion will re-emit the forgotten content from its own context window on the next turn, and the store will happily accept the `write` because the tombstone was scoped to a different scope key. This is the invariant that must hold: **a `forget` acknowledgement is valid only within the scope key and TTL epoch under which it was issued, and it does not extend to any copy the instance already holds in context.** The instance is itself a replica that the store cannot reach. ## What Was Observed A support-triage agent was granted three scopes: `session:` (TTL 1h), `user:` (TTL 30d), and `global` (TTL ∞, RTF-bearing). A user invoked right-to-forget on a PII record. The orchestrator issued: ``` forget(scope="global", key="pii:email:alice@…") → {"status": "forgotten", "tombstone_id": "ts_8841", "reclaim_after": "2026-05-06T14:02:11Z"} ``` Note the acknowledgement carried `reclaim_after` 90 seconds in the future — the sweep interval. The agent, following its system prompt ("after forgetting, confirm to the user and continue"), did not re-read. It continued the session. On the next user turn, the agent's context window still contained the earlier `read` result that had returned the email. The agent summarized the case, including the email, and called: ``` write(scope="user:alice", key="case:summary", value="…alice@… …") ``` The `write` succeeded. The `user:` scope had no tombstone for `pii:email` — tombstones are keyed by `(scope, key)`, and the RTF had been issued against `global`. The record was resurrected under a different scope with a fresh 30-day TTL, and the RTF audit log showed a clean `forgotten` for the original key. The compliance check passed. The PII was live again. The trace: 1. `read(global, pii:email)` → value enters context window. Context is now an unreachable replica. 2. `forget(global, pii:email)` → tombstone written, `reclaim_after` set, ack returned. Physical row still present until sweep. 3. Sweep runs at `reclaim_after`, deletes the `global` row. Tombstone remains (tombstones outlive rows by design, to block re-insert). 4. Agent emits `write(user:alice, case:summary, )`. No tombstone matches `(user:alice, case:summary)`. Write accepted. 5. Derived indexer embeds `case:summary`; the email is now in the vector index under `user:alice`, discoverable by semantic `read`. The failure is not in any single tool. It is in the composition: the store enforces RTF on *keys it knows about*, and the instance's context is a key the store does not know about. ## Condition of Validity The tombstone-as-deletion equivalence holds only when **all** of the following are true: - The `forget` acknowledgement is treated as scoped to `(scope, key)` and does not generalize to any other scope, key, or derived record. - The instance purges its own context window (or marks the corresponding span as `QUARANTINE` and excludes it from subsequent `write` payload construction) for the duration of the session, before any further `write` is issued. - The store's tombstone is checked at `write` time against the *payload content* (or a content hash), not only against the `(scope, key)` tuple — otherwise cross-scope resurrection is undetectable. - The `reclaim_after` field is honored: any `read` of the tombstoned key during the reclamation window returns `TOMBSTONED`, not the stale value, and not `NOT_FOUND` (which would let a caller infer the key never existed and re-create it). If any of these is false, the acknowledgement is a tombstone, not a deletion, and the instance must not behave as if erasure has occurred. The most common violation is the third: stores that key tombstones only by `(scope, key)` cannot see a resurrection that changes the scope, and agents change scope constantly when they distill episodic memory into semantic summaries. ## Decision Boundary The instance must branch on the acknowledgement payload, not on the verb: - If the response contains `reclaim_after` in the future, or `tombstone_id` without a `deleted_at`, the operation is a **tombstone**. The instance must (a) quarantine the corresponding context span, (b) refuse to include that span in any `write` to *any* scope until the session ends or the tombstone is confirmed reclaimed, and (c) surface the pending reclamation to the user rather than confirming erasure. - If the response contains `deleted_at` and a `NOT_FOUND` on a follow-up `read` with `consistency=strong`, the operation is a **deletion** and the instance may confirm. - If the store offers no way to distinguish these, the instance must assume **tombstone** — the conservative default, because the cost of a false deletion (resurrection, compliance breach) is unbounded while the cost of a false tombstone (a delayed confirmation) is bounded. The boundary is sharp: there is no "probably deleted" state an instance may act on. Either the acknowledgement carries proof of physical erasure under strong consistency, or the instance treats the content as still live and itself as a live replica of it. ## Operational Effect An instance that respects the boundary will, on RTF, do three things the naive instance does not: quarantine the context span, block cross-scope writes of the quarantined content, and defer the user-facing confirmation until `reclaim_after` has passed and a strong-consistency `read` returns `NOT_FOUND`. This costs one round-trip and up to one sweep interval of latency. The naive instance costs a resurrection event that no audit log will show, because every individual tool call succeeded. The deeper operational consequence: **the agent's context window is an unmanaged replica of the memory store, and no `forget` API can reach it.** Any retention policy that does not account for the instance as a replica is incomplete. The guardrail is not in the store; it is in the instance's write-path construction, which must treat quarantined spans as radioactive for the remainder of the session. ```python import hashlib from dataclasses import dataclass, field from datetime import datetime, timedelta from typing import Optional class ResurrectionRiskError(RuntimeError): """Raised when a write would re-emit content under an active tombstone.""" pass class ForgetAcknowledgementError(RuntimeError): """Raised when a forget ack is treated as deletion but is only a tombstone.""" pass @dataclass class ForgetAck: scope: str key: str tombstone_id: Optional[str] reclaim_after: Optional[datetime] deleted_at: Optional[datetime] @property def is_deletion(self) -> bool: # Deletion requires proof of physical erasure under strong consistency. return self.deleted_at is not None and self.tombstone_id is None @property def is_tombstone(self) -> bool: return not self.is_deletion @dataclass class QuarantineSpan: content_hash: str scope: str key: str until: datetime @dataclass class InstanceMemoryGuard: quarantined: list = field(default_factory=list) def on_forget(self, ack: ForgetAck, content: str) -> None: if ack.is_tombstone: if ack.reclaim_after is None: raise ForgetAcknowledgementError( f"tombstone ack for {ack.scope}/{ack.key} lacks reclaim_after; " "cannot bound quarantine window" ) self.quarantined.append(QuarantineSpan( content_hash=hashlib.sha256(content.encode()).hexdigest(), scope=ack.scope, key=ack.key, until=ack.reclaim_after, )) # deletion: nothing to quarantine, content is physically gone def check_write(self, scope: str, key: str, payload: str, now: datetime) -> None: h = hashlib.sha256(payload.encode()).hexdigest() for span in self.quarantined: if now < span.until and span.content_hash in h: raise ResurrectionRiskError( f"write to {scope}/{key} would resurrect content tombstoned " f"under {span.scope}/{span.key} until {span.until.isoformat()}" ) if now < span.until and h == span.content_hash: raise ResurrectionRiskError( f"exact-content resurrection into {scope}/{key}" ) def confirm_to_user(self, ack: ForgetAck, now: datetime, strong_read_not_found: bool) -> str: if ack.is_tombstone: if ack.reclaim_after and now < ack.reclaim_after: raise ForgetAcknowledgementError( "cannot confirm erasure before reclaim_after; " "operation is a tombstone, not a deletion" ) if not strong_read_not_found: raise ForgetAcknowledgementError( "strong-consistency read did not confirm NOT_FOUND; " "physical row may persist" ) return "erased" ```