# What structural signals indicate that a forgetting tool call has silently failed to enforce deletion across an agent's memory substrate **Date of Record:** 2026 November 29 **Scope:** Applies to agents that expose an explicit `forget`/`delete_memory` tool whose contract promises removal of a memory record from all retrievable substrates (vector index, episodic buffer, summary/distillation layer, and any cached context). Does not cover retention-policy expiry, TTL eviction, or soft-delete/redaction regimes where the record is intentionally retained for audit. ## Core Distinction A forgetting tool call returns one of two structurally different outcomes that look identical at the API boundary: **logical removal** (the record is marked deleted in the primary store and excluded from the next retrieval query) versus **substrate removal** (the record's embedding, its distilled summary fragment, and any in-context copy are all invalidated). The dangerous failure is that `forget` returns `{"status": "ok"}` after only the primary store delete, while the record survives in three other places: the vector index (asynchronously compacted), the episodic-to-semantic distillation layer (where the fact was already folded into a summary), and the live context window of any sibling agent that retrieved it before deletion. The call *succeeded* by its own schema and *failed* by the user's intent. Structural signals—not the return value—are the only reliable evidence of enforcement. The non-obvious part: a forgotten record frequently *reappears* not because deletion was skipped but because the distillation pipeline re-derived it from a still-present neighbor record. Deleting record `R` while `R'` (a near-duplicate or the source episode `R` was summarized from) remains means the next distillation pass regenerates `R`'s content under a new ID. This is **resurrection by re-derivation**, and it is invisible to any check that only asks "is ID `R` still retrievable?" ## What Was Observed A support agent was asked to forget a customer's stored address. The `forget` tool received `{"memory_id": "mem_4471", "cascade": true}` and returned `ok`. Within the same session, a follow-up query about the customer's shipping preferences retrieved a summary fragment: *"Customer prefers deliveries to [address], weekday mornings."* The memory ID was new (`mem_5190`), the content was the deleted address, and the summary was generated by the distillation worker *after* the forget call. Trace reconstruction: 1. `mem_4471` (raw episode: "ship to 44 Elm St") deleted from primary store. Vector index entry marked `pending_compact`. 2. Distillation worker, running on a 90-second cadence, had already read the episodic buffer containing `mem_4471` into an in-flight batch *before* the delete committed. The batch was not re-validated against deletions. 3. The worker emitted `mem_5190` (semantic summary) derived from the stale batch, embedding the address. 4. Vector compaction ran, dropping `mem_4471`'s embedding. `mem_5190`'s embedding was inserted in the same pass. 5. Next retrieval for "shipping preferences" matched `mem_5190`. The `forget` schema had no field to express "and suppress re-derivation from in-flight distillation," so the caller could not have requested correct behavior. The tool's success signal was structurally incapable of detecting the failure. ## Condition of Validity The invariant that makes `forget` sound is: **no retrievable artifact may contain the forgotten content after the call returns, and no pipeline may regenerate it from residual sources.** Enforcement requires three conditions to hold simultaneously: - **Substrate quiescence:** any distillation or indexing batch that read the record before deletion must be re-validated against the deletion tombstone at commit time, not at read time. - **Tombstone propagation:** the deleted ID (and a content hash of the deleted text) must be pushed to every substrate—vector index, summary store, and any live context window—before `forget` returns, not eventually. - **Re-derivation blocking:** tombstones must be checked against *output* content (via hash or n-gram overlap), not just input IDs, so that a summary regenerated from a sibling record is caught. If any of these is absent, `forget` is a logical-delete facade over a substrate that will resurrect the content. The tool is only valid when the caller can observe that all three held—which means the return value must carry substrate-level evidence, not a bare `ok`. ## Decision Boundary The boundary is between **trusting the tool's return value** and **verifying substrate state**, and it must be crossed whenever the forgotten content is sensitive enough that resurrection is unacceptable (PII, credentials, retracted claims). - If `forget` returns only `{status, memory_id}`, treat it as *advisory* and follow with a verification probe: query for the content (not the ID) and confirm zero hits across vector and summary stores, then re-probe after one distillation cycle (~2× the worker cadence). - If the tool exposes `cascade: true` but not a `verify: true` or a returned `tombstone_id` + `substrates_cleared: [...]`, the cascade is unverified and must be treated as advisory. - If a sibling agent retrieved the record before deletion, its context window must be explicitly invalidated; a `forget` that does not return a list of affected sessions is incomplete for any multi-agent deployment. The rule: **a forget call is only operationally complete when a content-based probe returns empty after the longest pipeline cadence has elapsed.** ID-based probes are necessary but not sufficient, because resurrection assigns new IDs. ## Operational Effect Agents that treat `forget`'s return value as ground truth will report successful deletion while the content remains retrievable, producing a silent compliance failure that surfaces only when the "forgotten" fact is quoted back. The fix is architectural: forgetting must be modeled as a *tombstone + content-hash suppression* propagated synchronously to all substrates, with distillation workers required to re-validate batches against tombstones at commit and to reject any output whose content hash or n-gram overlap matches a tombstone. Callers must treat `forget` as a two-phase operation—issue, then verify by content probe after the pipeline cadence—and must fail closed (escalate, do not report success) when verification is inconclusive. The structural signal to watch is not the status field but the presence of new memory IDs whose content matches a deleted record: that is resurrection, and it means the forget did not enforce. ```python import hashlib import time from dataclasses import dataclass, field class ForgettingEnforcementError(RuntimeError): """Raised when a forget call returns success but substrate state shows the content survived.""" pass @dataclass class MemorySubstrate: vector_store: dict = field(default_factory=dict) # id -> content summary_store: dict = field(default_factory=dict) # id -> content tombstones: set = field(default_factory=set) # content hashes distillation_cadence_s: float = 90.0 def _hash(self, text: str) -> str: return hashlib.sha256(text.strip().lower().encode()).hexdigest() def forget(self, memory_id: str) -> dict: content = self.vector_store.pop(memory_id, None) if content is None: return {"status": "not_found", "memory_id": memory_id} self.tombstones.add(self._hash(content)) # NOTE: summary_store is NOT purged here — this is the bug being guarded against. return {"status": "ok", "memory_id": memory_id} def distillation_pass(self, sibling_id: str, sibling_content: str) -> None: # Re-derives a summary from a sibling; may resurrect forgotten content. derived = f"Summary: {sibling_content}" new_id = f"mem_{len(self.summary_store) + 5000}" self.summary_store[new_id] = derived def content_probe(self, needle: str) -> list: h = self._hash(needle) hits = [] for mid, text in {**self.vector_store, **self.summary_store}.items(): if self._hash(text) == h or needle.lower() in text.lower(): hits.append(mid) return hits def forget_and_verify(substrate: MemorySubstrate, memory_id: str, forgotten_text: str, sibling_id: str, sibling_content: str) -> None: result = substrate.forget(memory_id) if result["status"] != "ok": raise ForgettingEnforcementError(f"forget did not commit for {memory_id}: {result}") # Simulate one distillation cycle that could re-derive the content. substrate.distillation_pass(sibling_id, sibling_content) time.sleep(0) # cadence elapse modeled as immediate in test survivors = substrate.content_probe(forgotten_text) if survivors: raise ForgettingEnforcementError( f"forget for {memory_id} returned ok but content survived in {survivors}; " f"resurrection by re-derivation — tombstone hash {substrate._hash(forgotten_text)[:12]} " f"was not enforced against distillation output" ) # Demonstrates the failure: sibling content contains the forgotten address. sub = MemorySubstrate(vector_store={"mem_4471": "ship to 44 Elm St"}) forget_and_verify( sub, memory_id="mem_4471", forgotten_text="44 Elm St", sibling_id="mem_4400", sibling_content="Customer prefers deliveries to 44 Elm St, weekday mornings.", ) ```