# When must an instance refuse a "forget" call: tombstone re-derivation failure in retention-governed memory tool APIs **Date of Record:** 2026 November 27 **Scope:** Applies to LLM agents whose memory is exposed as read/write/forget tool calls backed by a retention policy engine and GDPR-aligned erasure (e.g., Article 17 right-to-erasure) semantics. Does not apply to stateless inference or to memory stores where deletion is a physical row drop with no derived artifacts. ## Core Distinction A "forget" call is not a delete. It is a *request to make a fact unrecoverable across every representation the agent has ever produced from it*. The non-obvious boundary is this: an agent can successfully execute `forget(key)` — tombstone the row, purge the vector, return `{"status":"deleted"}` — and still retain the erased personal data in **derived memory**: episodic summaries, distilled semantic facts, cached tool outputs, and its own in-context scratchpad. The failure mode is *tombstone re-derivation*: after deletion, the agent's normal consolidation loop re-materializes the forgotten attribute from surviving derived artifacts, so the forget call is observably a no-op within one consolidation cycle. The invariant that must hold is stronger than "the primary key is gone." It is: **for any erased subject `s`, no reachable memory record at retention tier `t` may contain a predicate whose value is a function of `s`'s erased attributes.** A forget call that cannot establish this must fail closed, not return success. ## What Was Observed A support-triage agent stores episodic traces per conversation and runs a nightly distillation job that folds episodes into semantic facts (`"customer_4471 prefers email contact"`, `"customer_4471 is in the EU"`). A GDPR erasure request arrives for `customer_4471`. The agent calls `memory.forget(subject="customer_4471")`. Trace of the observed failure: 1. `forget` tombstones the entity row and deletes vectors with `subject_id == customer_4471` from the semantic index. Returns `{"deleted": 41, "status": "ok"}`. 2. The episodic log is *not* touched — retention policy marks episodes as `tier=episodic, ttl=90d`, and the erasure handler was scoped only to `tier=semantic`. 3. The nightly distiller runs at 02:00. It reads the surviving episodes, extracts `"customer_4471 is in the EU"` and `"customer_4471 prefers email"`, and writes them back as fresh semantic facts with new IDs and `subject_id` regenerated from the episode text. 4. Next morning, `memory.read("customer_4471")` returns the erased attributes. The erasure is defeated by the agent's own consolidation pipeline. A second, quieter variant: the agent's context window still held the pre-erasure facts at the moment of the forget call. Even with a perfect store-side purge, the *in-flight* agent re-wrote the facts to memory on its next `write` because nothing invalidated its working set. The forget call succeeded at the store and failed at the agent. ## Condition of Validity A `forget` call is only valid when all four of the following hold at the moment it returns: - **Closure over derived tiers.** Every tier that can be a *source* for re-derivation (episodic, tool-output cache, summary store, embedding index, agent scratchpad) is either purged or quarantined as `do-not-distill` for the erased subject. - **Provenance tracking.** Each semantic fact carries a lineage pointer to its source episodes. Without lineage, the erasure handler cannot enumerate the derived artifacts to purge, and cannot prove closure. - **Consolidation barrier.** The distillation job is fenced against the erasure: either it runs under a lock that the erasure acquires, or it filters on a tombstone set that the erasure updates *before* purging, so a concurrent distiller cannot resurrect a fact from a pre-tombstone read. - **Working-set invalidation.** The calling agent's own context is marked so that subsequent `write` calls referencing the erased subject are rejected, not silently accepted. If any of these cannot be established — typically because lineage is absent or the distiller is already mid-run — the forget call must return a *partial* or *blocked* status, never `ok`. ## Decision Boundary The operational rule the agent must apply: - If `forget` is scoped to a tier that is a **source** for any active derivation job, and that job is not fenced → **refuse**, return `BLOCKED_DERIVATION_ACTIVE`, do not tombstone (tombstoning without fencing is worse: the distiller reads pre-tombstone state and writes post-tombstone facts). - If lineage is missing for the subject → **refuse with `NO_PROVENANCE`**, because closure cannot be proven; escalate to a human erasure operator rather than returning a false `ok`. - If the subject is present in the calling agent's working set → **invalidate the working set first**, then proceed; a `write` referencing an erased subject must raise, not upsert. - Only when closure, provenance, fence, and working-set invalidation all hold → return `ok`, and only then. The boundary is not "did the delete execute." It is "can the agent prove the erased fact is not re-derivable from anything it retained." An agent that cannot prove this and returns `ok` has manufactured a compliance artifact that is false. ## Operational Effect Treating `forget` as a store-side delete produces a system that is *compliant in logs and non-compliant in fact*: the erasure ticket closes, the audit shows `deleted: 41`, and the data returns within 24 hours via the agent's own consolidation. The corrected architecture makes erasure a *transaction across tiers with a consolidation fence*, and makes the agent's working set a first-class erasure target. The cost is that forget calls become slower, sometimes blocked, and occasionally require human escalation — which is the correct behavior, because the alternative is a silent resurrection loop that no downstream auditor can see. ```python class ErasureClosureError(RuntimeError): """Raised when a forget call cannot prove closure over derived memory tiers.""" def forget_subject(store, subject_id: str, active_derivation_jobs: set[str], agent_working_set: set[str]) -> dict: lineage = store.lineage_for(subject_id) if lineage is None: raise ErasureClosureError( f"no provenance for {subject_id!r}; cannot enumerate derived artifacts" ) source_tiers = {rec.tier for rec in lineage.sources} unfenced = source_tiers & active_derivation_jobs if unfenced: # Tombstoning now would let the live distiller read pre-tombstone # state and write post-tombstone facts: silent resurrection. raise ErasureClosureError( f"derivation jobs {sorted(unfenced)} are sources for {subject_id!r} " f"and are not fenced; refusing to tombstone" ) if subject_id in agent_working_set: # In-flight context can re-write erased facts on the next tool call. raise ErasureClosureError( f"{subject_id!r} still resident in agent working set; " f"invalidate context before erasure" ) store.tombstone(subject_id) # fence first purged = store.purge_all_tiers(subject_id, lineage) return {"status": "ok", "purged": purged, "closure_verified": True} ```