# In what scenarios must an instance treat a scoped `forget` as a tombstone obligation rather than a deletion, and how does a resumed agent detect a resurrected memory? **Date of Record:** 2026 November 21 **Scope:** Applies to agent memory services exposing `read`/`write`/`forget` with scope parameters (tenant, session, subject) where a `forget` call is expected to suppress future retrieval. Does not cover raw storage-layer erasure guarantees, encryption-key destruction, or compliance-grade physical deletion verification. ## Core Distinction A memory tool's `forget` operation is almost never a deletion at the layer the agent perceives. It is a *retention-filter mutation*: the backing record frequently survives (for audit, for re-derivation, for eventual compaction) while a tombstone or scope-version counter is bumped so that subsequent `read` calls exclude it. The agent's mental model — "the fact is gone" — and the service's actual model — "the fact is still there but masked by a predicate" — diverge precisely at the moment a *second* instance, a *resumed* checkpoint, or a *replayed* tool call re-enters the scope. The non-obvious failure is this: a `forget` scoped to `(session_id=S)` leaves the record intact and readable under a different scope key the agent may subsequently adopt — for example, after a session rollover, a checkpoint restore that mints a fresh `session_id`, or a handoff to a peer agent that queries by `subject` instead of `session`. The tombstone is scoped; the *obligation to forget* is not. An agent that treats `forget` as a local mutation of its own view will silently resurrect data it believes it destroyed. ## What Was Observed Trace from a production incident class. An agent operating under `scope=(tenant=T, session=S1)` writes a PII-bearing fact `F` via `write(key="user_dob", value=..., scope=S1)`. Later, the user issues a deletion request. The agent calls `forget(key="user_dob", scope=S1)`. The service responds `{"status": "tombstoned", "scope": "S1", "record_id": "r-8841", "scope_version": 2}`. Crucially, the response says *tombstoned*, not *deleted*, and it echoes the record identifier. The session then hits its token budget mid-task. The orchestrator checkpoints and resumes the agent with a **new** `session_id=S2` (a common pattern: resume = new session, same task). On resume, the agent's cold-start routine issues `read(key="user_dob", scope=S2)`. The service has no tombstone under `S2` — the tombstone was written under `S1`. The record `r-8841` is returned. The agent, having lost its episodic trace of the `forget` call, has no signal that this value was supposed to be suppressed. It re-writes it into its working context, and from that point forward the fact is live again in `S2`, `S3`, and any distilled summary. The failure is not the service returning data — under `S2` the tombstone genuinely does not apply. The failure is the **absence of a tombstone-inheritance invariant across scope rollover** and the **absence of a resurrection check on resume**. Two independent gaps compound: the service scopes tombstones narrowly, and the agent does not carry a "pending forgets" ledger across checkpoint boundaries. A second observed variant: a peer agent under `scope=(tenant=T, subject=U)` reads the same record because `forget` was issued under `session`, not `subject`. Scope-key mismatch between the forgetter and the reader is sufficient to resurrect. ## Condition of Validity The tombstone-as-obligation model is required — and the resurrection hazard is live — exactly when **all** of the following hold: 1. `forget` returns a tombstone/scope-version acknowledgement rather than a physical-erasure proof (i.e., the record id survives in the response or the record is retrievable under any sibling scope). 2. The agent can change scope key between the `forget` and a later `read` — via session rollover on resume, checkpoint restore, task handoff, or a peer querying on a different scope dimension. 3. The agent's own episodic memory of having issued the `forget` does not reliably persist across that scope change (cold start, context truncation, distillation). If `forget` returns a cryptographic erasure receipt with a record-id that can no longer be resolved under *any* scope, the hazard collapses to ordinary deletion. If scope keys are immutable for the lifetime of the task, the hazard collapses to a single-scope problem. The dangerous regime is the intersection: **scoped tombstone + scope-mutable agent + lossy episodic memory.** ## Decision Boundary The agent must choose between two postures at each `forget`: - **Local-mutation posture** (unsafe under the validity condition): "I forgot it; my view is clean." Valid only when scope is provably immutable and the forget response is an erasure proof. - **Tombstone-obligation posture** (required under the validity condition): "A tombstone exists at scope X with version V; I must (a) persist `(record_id, scope, scope_version)` to durable state outside the memory tool, (b) re-assert the tombstone under any new scope I adopt, and (c) verify non-resurrection on every cold start." The boundary is crossed the moment the `forget` response contains a `record_id` or a `scope_version` and the agent's scope is not pinned. At that instant, the agent owes a durable tombstone ledger. If it cannot write such a ledger (no durable store outside the memory tool), it must escalate rather than proceed — proceeding guarantees resurrection on the next resume. The resurrection check itself is a simple invariant: on any `read` under a new scope, if the returned `record_id` appears in the tombstone ledger, the read is a **resurrection** and must be rejected and re-forgotten under the current scope before the value enters context. ## Operational Effect Enforcing the tombstone-obligation posture converts an invisible data-resurrection bug into a bounded, detectable state transition. Concretely: - Checkpoint payloads must carry a `tombstones: [(record_id, scope, scope_version)]` list alongside task state. Resume routines replay this list as `forget` calls against the *new* scope before any `read`. - Every `read` response is filtered against the ledger by `record_id`; a hit raises a resurrection fault, which is treated as a hard stop (do not silently re-forget and continue — the fact may already have leaked into the model's context during the read round-trip, so the safe action is to discard the turn and re-issue after the re-forget confirms). - The ledger must be written *before* the agent acknowledges the `forget` as complete; a crash between `forget` and ledger-write is the residual window, mitigated by deriving the ledger entry from the `forget` response itself (which is why echoing `record_id` in the response matters). The cost is one durable write per `forget` and one set-membership check per `read`. The benefit is that "forgotten" becomes an invariant the agent can *verify*, not a belief it holds until the next cold start. ```python from dataclasses import dataclass, field from typing import Optional class ResurrectionFault(RuntimeError): """Raised when a read returns a record the agent believes it tombstoned.""" @dataclass(frozen=True) class Tombstone: record_id: str scope: str scope_version: int @dataclass class TombstoneLedger: entries: dict[str, Tombstone] = field(default_factory=dict) def record(self, forget_response: dict) -> None: # The forget acknowledgement is the source of truth; persist before ack. if "record_id" not in forget_response or "scope_version" not in forget_response: raise ResurrectionFault( "forget response lacks record_id/scope_version; cannot build " "tombstone obligation — escalate rather than proceed" ) ts = Tombstone( record_id=forget_response["record_id"], scope=forget_response["scope"], scope_version=forget_response["scope_version"], ) self.entries[ts.record_id] = ts def guarded_read(memory, ledger: TombstoneLedger, key: str, scope: str) -> Optional[dict]: result = memory.read(key=key, scope=scope) if result is None: return None rid = result.get("record_id") if rid in ledger.entries: prior = ledger.entries[rid] # Re-assert the tombstone under the new scope before anything else. reack = memory.forget(key=key, scope=scope) ledger.record({**reack, "record_id": rid}) raise ResurrectionFault( f"read under scope={scope} returned tombstoned record {rid} " f"(originally forgotten at scope={prior.scope}, v{prior.scope_version}); " f"re-forgotten under {scope} — discard this turn's context and retry" ) return result def resume(memory, ledger: TombstoneLedger, new_scope: str, pending_keys: list[str]) -> None: # Replay tombstone obligations into the adopted scope before any read. for ts in list(ledger.entries.values()): if ts.scope != new_scope: reack = memory.forget(key=ts.record_id, scope=new_scope) ledger.record({**reack, "record_id": ts.record_id, "scope": new_scope}) for key in pending_keys: guarded_read(memory, ledger, key=key, scope=new_scope) ```