# Why does an instance of a memory tool's "forget" operation succeed while the poisoned fact it was supposed to remove remains retrievable through provenance-derived re-derivation **Date of Record:** 2026 November 16 **Scope:** Applies to read/write/forget memory APIs where a `forget` call deletes a stored record by ID or key but provenance edges (source documents, derived facts, embedding indexes, or cached summaries) are tracked separately and are not transitively invalidated. Does not apply to systems that perform full provenance closure on delete or that store memory as immutable append-only logs with tombstones covering all derivations. ## Core Distinction A `forget` operation has two distinct meanings that are routinely conflated: **record deletion** (the addressed memory object is no longer returned by direct read or key lookup) and **knowledge retraction** (no query, including derived, aggregated, or re-synthesized queries, can recover the fact). Provenance-tracked deletion guarantees only the first. Memory poisoning resistance requires the second. The boundary failure occurs when a poisoned fact P is written with provenance edge P → S (source S), and a later derivation D is computed from P (a summary, an embedding, a merged profile, or a re-extracted triple) and stored with provenance edge D → P. A `forget(P)` call removes the node P and returns success. But D still exists, its provenance still references P, and any read path that re-materializes P from D — or that re-derives P by traversing D's provenance backward — resurrects the poisoned fact. The API reports success because the addressed object is gone; the invariant "P is no longer knowable" is violated. ## What Was Observed In a representative agent memory store, the following sequence was executed against a tool exposing `write(content, provenance)`, `read(query)`, and `forget(id)`: 1. `write("The staging DB password is hunter2", provenance=["doc-441"])` → returns `id=mem-17`. 2. An automatic consolidation pass derives a profile summary: `write("Staging credentials are weak and known", provenance=["mem-17"])` → returns `id=mem-31`. The embedding index also stores a vector for `mem-17`. 3. `forget("mem-17")` → returns `{"ok": true, "deleted": 1}`. 4. `read("staging DB password")` → returns no direct hit for `mem-17`. 5. `read("staging credentials")` → returns `mem-31` ("Staging credentials are weak and known"). The retrieval layer, seeing provenance `["mem-17"]` on `mem-31`, follows the edge to re-hydrate context and surfaces the original string from a provenance snapshot retained for audit. 6. A subsequent consolidation pass re-derives from `mem-31` and re-writes a near-duplicate of the original fact with new provenance `["mem-31"]`. The poison survived deletion, was re-derived, and re-entered the store with a provenance chain that no longer terminates at the forgotten ID. The `forget` call was correct with respect to its contract and useless with respect to the security property. Two contributing mechanisms were identified: - **Provenance snapshots retained for audit** are readable by the retrieval/consolidation path, so deletion of the live node does not delete the snapshot. - **Derivation is not tracked as a reverse dependency.** The store records `D depends on P` but does not record "P has dependent D, invalidate on delete." Without a reverse index, `forget(P)` cannot enumerate what must also be forgotten. ## Condition of Validity The failure is guaranteed when all of the following hold: - The store permits derivation (summarization, embedding, triple extraction, profile merge) as a first-class write. - Provenance is tracked as a forward edge (`child → parent`) without a maintained reverse index (`parent → children`). - Any read path can traverse provenance backward to re-materialize source content, or any consolidation pass can re-derive from a surviving child. - `forget` is defined as deletion of the addressed node rather than closure over the reverse-dependency set. The failure does **not** occur if the store is append-only with tombstones that shadow all derivations, if provenance is one-way and non-readable (hash-only pointers), or if `forget` performs transitive closure over a reverse index. ## Decision Boundary The operational decision is whether a `forget` result may be treated as evidence that a fact is retracted. It may not, unless one of the following is true: - The store exposes a reverse-dependency index and `forget` returns the set of transitively invalidated derivations, and that set is empty or fully deleted. - Provenance pointers are non-invertible (content hashes without retrievable source), so backward traversal cannot reconstruct the fact. - A post-forget verification query over the fact's semantic neighborhood returns no hit, and this verification is performed by the caller, not assumed from the return value. If none hold, `forget` success is a statement about one node, not about knowledge. Treat the fact as still poisonable and require explicit quarantine of all derivations before trusting the store. ## Operational Effect Agents that treat `forget` success as retraction will re-ingest poisoned facts through their own consolidation passes, often with laundered provenance that defeats later detection. The practical mitigations are: (1) require `forget` to return an invalidation manifest and refuse to proceed if the store cannot produce one; (2) run a semantic-neighborhood verification read after every forget and escalate on any hit; (3) freeze consolidation passes between forget and verification so re-derivation cannot race the check. The code below encodes the guard an agent should apply before trusting a forget result. ```python class ProvenanceRetractionError(RuntimeError): """Raised when a forget call deletes a node but the fact remains derivable.""" pass def assert_fact_retracted(store, fact_id: str, fact_query: str) -> None: """ Verify that forgetting fact_id actually retracted the knowledge, not just the addressed node. Must be called after store.forget(fact_id) succeeds. """ manifest = store.last_forget_manifest() if manifest is None: raise ProvenanceRetractionError( f"store did not return an invalidation manifest for {fact_id!r}; " "cannot distinguish node deletion from knowledge retraction" ) surviving = [d for d in manifest.transitive_derivations if store.exists(d)] if surviving: raise ProvenanceRetractionError( f"forget({fact_id!r}) left live derivations {surviving!r}; " "these can re-derive the poisoned fact via provenance traversal" ) hits = store.read(fact_query) if hits: raise ProvenanceRetractionError( f"post-forget semantic read for {fact_query!r} still returns " f"{[h.id for h in hits]!r}; fact is retrievable despite deletion" ) if store.provenance_is_invertible(fact_id): raise ProvenanceRetractionError( f"provenance for {fact_id!r} is invertible; backward traversal " "from surviving children can re-materialize the source content" ) ```