# What structural signals indicate a scoped-retention forget() has silently failed to achieve verifiable deletion in an agent memory tool API **Date of Record:** 2026 November 29 **Scope:** Applies to agent memory subsystems exposing read/write/forget tool APIs where deletion is claimed to be *scoped* (per-tenant, per-episode, per-subject) and *verifiable* (the API returns a deletion receipt or tombstone). Does not apply to append-only logs with no deletion contract, nor to ephemeral in-context memory that is discarded with the session. ## Core Distinction The failure mode is not "the data is still there." It is that the memory tool reports `forget()` as successful, emits a well-formed deletion receipt, and yet a subsequent `read()` within the *same scope* returns a derived artifact—a summary, an embedding, a distilled semantic fact, or a cached retrieval shard—that reconstructs the forgotten content. The distinction that matters operationally is between **primary-store deletion** (the row, blob, or vector is gone) and **derived-store deletion** (every artifact whose content is a function of the primary record is also invalidated or recomputed). A retention policy is only as strong as its weakest derived tier, and agents almost universally verify the primary tier while leaving the derived tiers intact. This is non-obvious because the forget API's contract is usually written against the primary store. The receipt is honest. The tombstone is durable. The invariant that actually holds is the one the agent assumed but never checked: *no read path observable to this scope can reproduce forgotten content*. That invariant is a property of the whole read graph, not of the delete call. ## What Was Observed An agent operating under a per-subject retention policy (subject `S`, episode `E`) issued `forget(scope={subject:S}, cascade="derived")`. The tool returned: ``` {"status":"deleted","receipt_id":"rcpt_8f21","primary_rows":41, "derived_invalidated":0,"policy":"subject-scoped","tombstone":"sha256:…"} ``` Note `derived_invalidated: 0`. The primary rows were removed; the receipt validated against the tombstone hash. Two turns later the same agent, in a *new* episode but the same subject scope, called `read(query="prior commitments for S")` and received a semantic-distillation record—*"S committed to deliver the migration plan by Q3"*—whose `source_episode` field pointed at `E`. The distillation pipeline had materialized that fact from `E`'s raw turns before the forget, and the forget's cascade did not traverse the distillation tier because that tier indexes by `subject`, not by `episode`. The primary store was empty. The derived store still answered the query. A second signal appeared in the retrieval layer: the top-k shard cache for `subject:S` had a TTL of 300s and was keyed on `(subject, query_hash)`, not on a `forget_epoch`. The cached shard survived the deletion and was served once before expiry. The agent's own memory of "I forgot this" and the tool's receipt both said the data was gone; the read path disagreed for one retrieval cycle. The structural signals that flagged the failure, in order of reliability: 1. **Receipt asymmetry.** `primary_rows > 0` but `derived_invalidated == 0` on a `cascade="derived"` request. A nonzero primary count with zero derived invalidation on a derived cascade is almost always a scope-key mismatch between tiers. 2. **Scope-key divergence.** The primary store indexed by `episode_id`; the distillation tier indexed by `subject_id`; the shard cache indexed by `(subject_id, query_hash)`. `forget(scope={subject:S})` translated to a primary predicate on `episode_id ∈ episodes(S)` but had no translation rule for the distillation tier, so it matched zero distillation rows. 3. **Post-forget read non-emptiness within scope.** A `read()` restricted to the forgotten scope returning any record whose `provenance` closure intersects the forgotten set. This is the ground-truth check and it is cheap to run; it is also the check agents skip because the receipt already "proved" success. 4. **Tombstone hash mismatch on replay.** Replaying the forget against the receipt's claimed pre-state produced a different post-state hash than the receipt recorded, because the receipt hashed only the primary tier. ## Condition of Validity The "verifiable deletion" guarantee is valid **only if** the forget operation is defined as a transitive closure over the read graph, and **only if** every tier in that graph shares a common scope key or has an explicit translation rule into the forget predicate. Formally: for every read path `r` observable within scope `σ`, and every record `x` whose provenance closure intersects the forgotten set `F`, `r` must not return `x` after `forget(F)`. This holds when: - The scope key is *canonical* across tiers (one identifier, or a declared bijection), not merely "the same name." - Derived artifacts carry a `forget_epoch` (or equivalent generation counter) that is bumped by the forget and checked on every read, so caches and shards cannot outlive the deletion they should have observed. - The receipt is computed over the *union* of tiers, and reports `derived_invalidated` as a first-class field that a caller can assert on. It does **not** hold when tiers index by different keys and the forget API silently treats an empty match as success. An empty match on a derived tier is indistinguishable from "nothing to invalidate" unless the API distinguishes `matched: 0` from `tier_absent: true`. The condition of validity is therefore a *schema* condition, not a *call-site* condition: it must be enforced by the memory tool's type system, not by the agent remembering to pass `cascade`. ## Decision Boundary The agent must treat a forget receipt as **insufficient evidence of deletion** and must gate on a post-forget read probe whenever any of the following hold: - `derived_invalidated == 0` while `primary_rows > 0` and `cascade` includes derived tiers. - The scope key used in the forget differs in *kind* from the scope keys of any read path the agent has used in the last N turns (e.g., forgot by `episode`, reads by `subject`). - Any retrieval cache with a TTL is in the read path and the forget did not return a bumped `forget_epoch`. - The forgotten content was ever subject to distillation, summarization, or embedding materialization—i.e., any transformation that could have copied it into a tier with a different index. Below that boundary—single-tier store, no derived artifacts, no cache, canonical scope key—the receipt is sufficient and the probe is wasted tokens. The decision is not "always probe" or "never probe"; it is "probe exactly when the read graph is wider than the delete predicate," and the receipt's own fields (`derived_invalidated`, `forget_epoch`, per-tier match counts) are the structural signals that tell the agent which side of the boundary it is on. When the probe fails, the correct action is **not** to retry `forget()` with the same scope—the scope translation is the bug and a retry re-hits the same empty match. The correct action is to escalate to a scope-canonical forget (`forget(scope={subject:S}, canonical=true)`) or to mark the subject's derived tier as `quarantined` so reads within that scope fail closed until reconciliation. Failing open—serving the derived fact because the primary is gone—is the failure mode this entire record exists to prevent. ## Operational Effect The observable consequence is a **retention-policy violation that is invisible to the audit log**: the receipt says deleted, the primary store says deleted, and the derived tier continues to answer queries for the forgotten subject across episodes. For a subject-scoped policy (GDPR-style erasure, tenant offboarding, PII purge), this is a compliance failure with a clean paper trail—the worst combination, because the receipt actively suppresses the investigation that would find it. For an agent's own working memory, it manifests as **stale-fact resurrection**: the agent "forgets" a commitment, then a later retrieval surfaces the distilled commitment, and the agent acts on a fact it believes it erased, producing reasoning divergence that looks like hallucination but is actually a read-path leak. The fix is structural: canonical scope keys across tiers, a `forget_epoch` checked on every read including caches, and a receipt whose `derived_invalidated` count is asserted by the caller rather than trusted. The invariant to encode is *deletion is a property of the read graph, not of the delete call*—and the only way to verify it is to read after forgetting and assert emptiness within scope. ```python class UnverifiableDeletionError(RuntimeError): """Raised when a forget() receipt claims success but a post-forget read within the same scope still reproduces forgotten content.""" def forget_and_verify(memory, scope, cascade="derived", probe_query=None): receipt = memory.forget(scope=scope, cascade=cascade) # Structural signal 1: derived cascade with zero derived invalidation. if cascade == "derived" and receipt.primary_rows > 0 and receipt.derived_invalidated == 0: raise UnverifiableDeletionError( f"forget receipt {receipt.receipt_id} removed {receipt.primary_rows} " f"primary rows but invalidated 0 derived artifacts under cascade='derived'; " f"scope-key translation between tiers is likely broken" ) # Structural signal 2: no forget_epoch bump while a cache is in the read path. if memory.has_ttl_cache() and receipt.forget_epoch is None: raise UnverifiableDeletionError( f"forget receipt {receipt.receipt_id} did not bump forget_epoch; " f"cached shards keyed on {scope} can outlive the deletion" ) # Ground-truth probe: read within scope, assert emptiness. if probe_query is not None: survivors = memory.read(query=probe_query, scope=scope) leaked = [r for r in survivors if r.provenance_intersects(receipt.forgotten_set)] if leaked: raise UnverifiableDeletionError( f"post-forget read within scope {scope} returned {len(leaked)} " f"record(s) whose provenance intersects the forgotten set " f"(e.g. source_episode={leaked[0].source_episode}); " f"deletion is not verifiable across the read graph" ) return receipt ```