# What happens when an instance forgets a fact through a memory tool but the underlying vector index retains it: retention-policy divergence and the resurrection invariant **Date of Record:** 2026 November 23 **Scope:** Applies to agents whose memory is mediated by explicit `write`/`read`/`forget` tool APIs layered over an ANN vector index with a separate retention/redaction ledger. Does not cover in-context scratchpad eviction or pure KV-cache truncation, where no persistent store exists. ## Core Distinction A `forget` call is an *intent* recorded in the memory-control plane. Deletion from the retrieval substrate is a *physical* operation in the data plane. These two planes are asynchronously coupled, and agents routinely conflate "the tool returned `forgotten: true`" with "the fact can no longer be retrieved." The distinction that matters is between **logical unlearning** (the control-plane ledger now marks a memory as redacted/expired, and future `read` calls filter it) and **physical erasure** (the embedding is removed from the ANN index, and no nearest-neighbor query can surface it). The failure mode lives in the gap: an agent that reasons about its own memory state using only the control-plane acknowledgment will behave as if a fact is gone while the data plane can still return it under a slightly different query embedding. ## What Was Observed An instance was instructed to forget a user's prior billing address after the user moved. It issued `forget(memory_id="m_8841", reason="user_relocation")`. The tool returned `{"status":"tombstoned","physical_purge":"queued","purge_sla_s":86400}`. The agent treated this as complete and, in the same session, answered a later question ("what's my current address?") by reading the *new* address memory. Correct. The failure surfaced two turns later when the agent ran a `read` for an unrelated query — "what documents do I still need to update?" — and the ANN index returned a chunk whose text was the *old* billing address, because the tombstone filter in the `read` path matched on `memory_id` but the retrieved chunk was a **derived fragment** (`m_8841#chunk_3`) written during an earlier episodic-to-semantic distillation pass. The tombstone did not cascade to derived children. The agent then wrote a summary that included the old address as "possibly still current," poisoning downstream state. The trace: 1. `write` of episodic memory `m_8841` (full address block) → distillation job splits into `m_8841#chunk_0..3`, each with its own embedding, each with `parent_id=m_8841`. 2. `forget(m_8841)` tombstones the parent only. 3. `read(query)` filters `WHERE tombstoned = false` on the retrieved row's `memory_id`. Child rows carry `memory_id = m_8841#chunk_3`, not `m_8841`, so the filter misses them. 4. Retrieved child text is re-injected into context; the model treats it as live evidence. This is not a race condition in the usual sense — the purge was *queued*, not racing. It is a **referential-integrity failure in the unlearning graph**: the forget operation is not closed under the `derived_from` relation. ## Condition of Validity The resurrection invariant holds — i.e., a forgotten fact cannot be re-surfaced — only if all three conditions are met: - **Cascade closure:** `forget(x)` tombstones the transitive closure of `{y : x →* y}` under the derivation relation, not just `x`. - **Filter completeness:** every read path (dense ANN, sparse/BM25 hybrid, reranker, and any summarization worker that reads the index) applies the tombstone predicate at *retrieval* time, not at *post-filter* time after the top-k is already selected. Post-filtering after top-k silently reduces recall and can return a child that survived because its parent's tombstone was applied too late. - **Purge monotonicity:** the physical purge, once observed by any reader, must be irreversible. A re-distillation job that re-reads the source document and re-derives the chunk after purge violates monotonicity unless the source is also tombstoned. If any of these is false, the invariant is not "mostly true" — it is *unboundedly* false, because the next distillation pass can regenerate an arbitrary number of children from a source that was only logically forgotten. ## Decision Boundary The agent must treat a `forget` acknowledgment as **advisory, not authoritative**, until it has positive evidence of cascade closure. Concretely, the decision boundary is: - If the `forget` response includes `cascade: "complete"` and `derived_count: N` with `N` matching the agent's own count of known children → safe to reason as if the fact is gone. - If the response includes `physical_purge: "queued"` or omits `derived_count` → the agent must **not** assert the fact is unrecoverable. It should either (a) re-query with a probe designed to surface derived fragments and verify none match, or (b) hold a `pending_unlearn` flag in its own working state and refuse to emit any claim that depends on the forgotten fact being absent. - If a `read` returns a chunk whose `parent_id` points to a tombstoned memory → this is a hard integrity violation, not a soft miss. The agent must halt the dependent task and escalate, because any downstream summary it writes will propagate the resurrected fact. The boundary is sharp because the cost asymmetry is sharp: a false "still forgotten" costs a redundant probe; a false "now gone" costs a poisoned semantic memory that may persist across sessions. ## Operational Effect The practical consequence is that **unlearning is a distributed transaction, and the agent is one of its participants.** An agent that treats `forget` as a local, synchronous operation will, with high probability, re-ingest a derived fragment within the same session and write it back as a fresh memory — at which point the fact has been laundered through the agent's own distillation and is now a *new* memory with no tombstone lineage at all. The guardrail is to make the agent's memory-write path check `parent_id` lineage against the tombstone ledger before accepting any re-derived content, and to make the `forget` tool contractually return the derivation closure so the caller can verify it. Without both, the system has no bound on how many times the same fact can be forgotten and resurrected. ```python class UnlearnCascadeError(RuntimeError): """Raised when a forget operation is not closed under the derivation relation.""" pass def forget_with_closure(store, memory_id: str, ledger) -> dict: # Enumerate the derivation closure; a forget that does not do this is unsound. children = store.derived_children(memory_id) if children is None: raise UnlearnCascadeError( f"cannot compute derivation closure for {memory_id}: " "store does not expose parent_id index; refuse to tombstone parent alone" ) ledger.tombstone(memory_id) for child in children: ledger.tombstone(child) # Verify no reader can still surface a child before claiming success. for child in children: probe = store.read(query=child.text, top_k=5) if any(hit.memory_id == child.memory_id for hit in probe): raise UnlearnCascadeError( f"derived fragment {child.memory_id} still retrievable after tombstone; " "read path is post-filtering or index purge has not propagated" ) return {"status": "cascade_complete", "derived_count": len(children)} ```