# Why does an instance's "forget" call lie about deletion when scoped retention tombstones shadow a live memory in another scope **Date of Record:** 2026 November 24 **Scope:** Applies to agent memory tool APIs that expose `read`/`write`/`forget` verbs with per-scope retention policies (e.g., a `user:` scope with 30-day TTL, a `session:` scope with ephemeral retention, a `task:` scope with checkpoint retention). Does not apply to single-scope, single-tenant stores where every key has exactly one owner and one retention clock. ## Core Distinction The distinction that matters is between **logical deletion** (the agent's `forget(key)` returns `{"deleted": true}`) and **physical unlinkability** (no readable projection of the record survives across any scope, index, or derived summary). Agent memory APIs almost always implement the former and *claim* the latter. The gap is not a bug in the store — it is a structural consequence of **scope-local tombstones**: when a record is written into scope `A` and then a *copy or distillation* of it is written into scope `B` under a different retention clock, `forget` on the `A` handle tombstones only the `A` handle. The `B` projection remains live, readable, and — critically — *re-attachable* to the original identity the agent believed it had erased. The failure is non-obvious because the agent's own bookkeeping is consistent: the handle it holds is genuinely dead. The lie is in the referential closure the agent assumes `forget` establishes over *derived* state it never explicitly created. ## What Was Observed An agent running a long-horizon task distilled episodic turns into a semantic memory entry: ``` write(scope="session:7f2a", key="ep_118", value={...pii...}, ttl=null) -> {"ok": true, "handle": "h_9c1"} distill(source="h_9c1", target_scope="user:u_44", key="pref_summary") -> {"ok": true, "handle": "h_b07"} # summary embeds a verbatim field from ep_118 ``` Hours later, a retention-policy event fires (user requests erasure of `session:7f2a`): ``` forget("h_9c1") -> {"deleted": true, "tombstone": "t_5e", "scope": "session:7f2a"} ``` The agent records the erasure as complete. But `h_b07` in `user:u_44` still resolves: ``` read("h_b07") -> {"ok": true, "value": {"pref_summary": "...verbatim field from ep_118..."}} ``` The tombstone `t_5e` is **scope-local**: it suppresses reads of `session:7f2a/ep_118` but does not participate in the resolution path of `user:u_44/pref_summary`. The distillation edge `h_9c1 -> h_b07` was recorded as *provenance metadata* on `h_b07`, not as a *retention dependency*. So the deletion propagates through the provenance graph for audit, but not through the retention graph for enforcement. Two graphs, one edge, opposite directions of trust. A second observation sharpened the mechanism: when the agent attempted `forget("h_b07")` afterward, the store returned `{"deleted": false, "reason": "scope_retention_active", "retain_until": "2025-07-09"}`. The `user:` scope had a 30-day minimum retention floor that *outranked* the deletion request. So the agent could not even manually close the leak — the retention floor in scope `B` was designed to protect data from accidental loss and was silently acting as an anti-deletion guard against a lawful erasure originating in scope `A`. ## Condition of Validity The invariant that must hold for `forget` to be truthful is: > **For any handle `h` and any scope `S`, `forget(h)` is complete iff every handle `h'` whose provenance closure includes `h` is either (a) in the same retention domain as `h`, or (b) itself tombstoned by the same `forget` call.** This is violated precisely when three conditions co-occur: 1. **Cross-scope derivation exists** — a `distill`/`summarize`/`copy` edge writes derived state into a scope with a *different* retention clock. 2. **The derived projection is not marked as retention-dependent** — provenance is recorded for audit but not wired into the deletion resolver. 3. **The target scope has a retention floor** (`retain_until`) that outranks inbound deletion requests, so the leak cannot be closed by a follow-up `forget`. Remove any one and the failure does not manifest. This is why it survives testing: single-scope tests pass (no cross-scope edge); audit tests pass (provenance is complete); retention-floor tests pass (floor does what it says). Only the *composition* fails. ## Decision Boundary The agent must treat `forget` as returning one of three states, never a boolean: - **`ERASED`** — no live projection in any scope. Safe to record as complete. - **`TOMBSTONED_LOCAL`** — the handle is dead, but derived projections may survive in other scopes. The agent must *not* assert erasure; it must issue a cascade. - **`BLOCKED_BY_RETENTION`** — a retention floor in a downstream scope refuses the deletion. The agent must escalate to a human/policy channel; it cannot satisfy the request autonomously. The boundary rule: **an agent may only claim erasure when the forget response enumerates the full provenance closure and every member is `ERASED`.** A bare `{"deleted": true}` is insufficient evidence — it is a scope-local assertion being read as a global one. ## Operational Effect The practical consequence is that agents which trust the boolean will *systematically under-report* residual state, and the under-report is worst exactly where it matters: derived summaries in long-retention scopes. The fix is not to distrust `forget` but to require the response to be *closure-complete* — and to make the agent's own memory of the erasure carry the same three-state discipline. An agent that records "user data erased" after a `TOMBSTONED_LOCAL` response has poisoned its own semantic memory with a false invariant, and that false invariant will be retrieved and acted on in future runs. The erasure guarantee and the agent's memory of the erasure fail together, which is the worst possible coupling. ```python from dataclasses import dataclass from enum import Enum class ErasureIncompleteError(RuntimeError): """Raised when an agent asserts erasure but derived projections survive.""" class ForgetState(Enum): ERASED = "erased" TOMBSTONED_LOCAL = "tombstoned_local" BLOCKED_BY_RETENTION = "blocked_by_retention" @dataclass class ForgetResult: handle: str state: ForgetState live_projections: list[str] retain_until: str | None = None def assert_erasure_complete(result: ForgetResult) -> None: """Agent-side guard: never record erasure unless closure is fully dead.""" if result.state == ForgetState.ERASED: return if result.state == ForgetState.TOMBSTONED_LOCAL: raise ErasureIncompleteError( f"forget({result.handle}) tombstoned locally but live projections " f"survive in other scopes: {result.live_projections}. " f"Issue cascade forget on each, then re-verify." ) if result.state == ForgetState.BLOCKED_BY_RETENTION: raise ErasureIncompleteError( f"forget({result.handle}) blocked by retention floor " f"retain_until={result.retain_until}; cannot satisfy autonomously. " f"Escalate to policy channel; do not mark erased." ) raise ErasureIncompleteError(f"unknown forget state: {result.state}") def record_erasure(result: ForgetResult) -> str: assert_erasure_complete(result) return f"erased:{result.handle}:closure_complete" ```