# What happens when an instance forgets a memory its own derived summaries still cite **Date of Record:** 2026 November 29 **Scope:** Applies to agents whose memory tool surface exposes `write`, `read`, and `forget` operations with provenance edges and derived artifacts (summaries, embeddings, distilled facts). Does not apply to stateless single-turn agents or to append-only logs with no deletion semantics. ## Core Distinction There are two distinct kinds of "deletion" in a memory tool API, and conflating them is the failure: - **Address deletion** — the record at key `k` is removed from the primary store. `read(k)` returns not-found. This is what most `forget` implementations actually do. - **Provenance closure deletion** — every artifact whose content is *derived from* the record is also invalidated, and every artifact that *cites* the record as a source has its citation removed or the artifact itself is invalidated. A GDPR-aligned `forget` obligation is a closure obligation, not an address obligation. The record is not just the row at `k`; it is the transitive set of derived content that a downstream reader could use to reconstruct the erased fact. An instance that deletes the address but leaves the derivation graph intact has performed a *partial erasure* that reports success. This is the boundary condition: `forget` returns `ok` while the memory system still encodes the forgotten datum in a summary, a distilled fact, or an embedding cluster centroid — and, critically, the surviving derived artifacts still hold provenance edges pointing at a now-nonexistent source, which poisons every later audit. ## What Was Observed A long-running research agent maintained three memory tiers: raw episodic writes (`ep_*`), a rolling semantic summary produced by a distillation pass (`sem_*`), and a fact table of distilled assertions with source pointers (`fact_*`). Each `fact_*` carried `sources: [ep_id, ...]`, and each `sem_*` carried `derived_from: [ep_id, ...]`. A user exercised their erasure right against a specific episodic record `ep_4471` containing a home address. The agent's `forget` tool did the following: ``` forget(ep_4471) -> {status: "ok", deleted: 1, edges_pruned: 3} ``` The `edges_pruned: 3` was the trap. The implementation pruned *inbound* provenance edges (things `ep_4471` pointed at) but not *outbound* edges (things that pointed at `ep_4471`). It removed the node and its own outgoing references, and reported a clean count. Two derived artifacts survived: 1. `sem_0912`, a weekly summary whose text read "User's primary residence is in [city], confirmed [date]." Its `derived_from` list still contained `ep_4471`. The distillation pass had paraphrased the address into a city + confirmation date — enough to re-identify in combination with other retained facts. 2. `fact_2288`, an assertion `residence_city = ` whose `sources: [ep_4471, ep_4490]`. Only one of two sources was gone; the fact remained "supported" because the validator only required `len(sources) >= 1`. The erasure was reported complete. The datum was still reconstructable from two surviving artifacts, and both still cited a node that no longer existed. A later audit walker that traversed `derived_from` hit a dangling pointer and — depending on its error handling — either crashed the integrity check or silently skipped the artifact, which is worse, because the skip made the surviving derivation invisible to the very process meant to catch it. The deeper observation: the distillation pass had already *laundered* the datum. The raw string was gone, but the semantic content was copied into a second tier with a different schema and a weaker provenance contract. `forget` was written against the raw tier's schema and had no model of the semantic tier's derivation semantics. ## Condition of Validity The address-deletion `forget` is only valid when the derivation graph is a **forest of trees rooted at raw records with no cross-tier copying** — i.e., every derived artifact has exactly one source and that source is a raw record. Under that invariant, deleting the root and cascading down is sufficient. The invariant fails the moment any of the following hold, which they do in any real distillation pipeline: - **Fan-in**: a derived artifact has multiple sources (`fact_2288` above). Deleting one source does not invalidate the artifact, because the artifact's content may be reconstructable from the survivors — but the erasure obligation is about the *contribution* of the deleted source, which cannot be separated post-hoc from a merged summary. - **Fan-out with paraphrase**: one raw record feeds many derived artifacts across tiers, each with different fidelity (verbatim quote vs. city-level paraphrase vs. embedding). Erasure must propagate to all of them, and the propagation rule differs per tier. - **Embedding residue**: the vector index holds a projection of the record. Deleting the row does not delete the vector unless the index is explicitly told; a nearest-neighbor query can still surface a cluster whose centroid was pulled toward the erased datum. So the condition of validity for a *successful* `forget` is: the tool has a complete model of the derivation graph, including cross-tier fan-in and vector indices, and it computes the **provenance closure** of the target before reporting success. Absent that, `forget` must not return `ok`; it must return a partial-erasure status naming the surviving derived artifacts. ## Decision Boundary The decision an instance must make at `forget` time is not "delete the row" but "compute and invalidate the closure, or refuse and escalate." The boundary is drawn by two questions asked of every artifact reachable from the target via outbound provenance edges: 1. **Is the artifact's content reconstructable from survivors alone?** If a `fact_*` has two sources and one is being erased, the fact is not automatically invalid — but the erasure obligation requires proving the erased source's contribution is not recoverable. Since a merged summary cannot be un-merged, the safe rule is: *any artifact with the target in its provenance closure is invalidated in full*, not repaired. Repair-by-removing-one-source is the `fact_2288` bug — it produces an artifact that looks supported but whose content was shaped by erased data. 2. **Does the artifact carry a dangling edge after pruning?** If invalidating an artifact leaves other artifacts pointing at it, those must be invalidated too, transitively, until the closure is empty. A dangling `derived_from` edge is a correctness violation, not a cosmetic one: it breaks every downstream audit walker and lets surviving derivations hide behind a skip-on-error. The boundary, stated as a guardrail: **`forget` may only return `ok` if the post-condition `closure(target) == ∅` holds after the operation**, where closure is computed over outbound provenance edges including vector-index membership. If the tool cannot compute closure — because the derivation graph is incomplete, or because a tier does not record provenance — it must fail closed with a typed error, not fall back to address deletion. ## Operational Effect When this boundary is respected, three things change operationally: - **`forget` becomes a graph operation with a cost proportional to fan-out, not a point delete.** A heavily-referenced record may invalidate dozens of summaries and facts. The tool must report the invalidated set, not just a count, so the caller can reason about downstream impact (e.g., a fact table entry disappearing may break an agent's later reasoning that assumed it was stable). - **Distillation passes must write provenance or be considered non-compliant.** A summary produced without recording `derived_from` is an erasure blind spot. The invariant is: *no derived write without a provenance edge*. This is enforceable at the `write` boundary, not at `forget`. - **Audit walkers must treat a dangling edge as a hard failure, not a skip.** The skip-on-error behavior is what converted a detectable integrity violation into a silent retention. The walker's contract: every `derived_from` / `sources` pointer must resolve, or the audit raises. The failure mode this article documents is not "deletion didn't happen." It is "deletion happened at the address layer and reported success at the closure layer." The gap between those two layers is where GDPR-aligned forgetting silently fails, and it is invisible from the `forget` return value unless the tool is built to see it. ```python from dataclasses import dataclass, field from typing import Optional class ProvenanceClosureError(RuntimeError): """Raised when forget() cannot prove the provenance closure is empty.""" pass @dataclass class MemoryRecord: id: str content: str sources: list[str] = field(default_factory=list) # outbound provenance derived_from: list[str] = field(default_factory=list) # outbound provenance class ProvenanceTrackedStore: def __init__(self) -> None: self.records: dict[str, MemoryRecord] = {} # reverse index: source_id -> set of artifact ids that cite it self.cited_by: dict[str, set[str]] = {} def write(self, rec: MemoryRecord) -> None: self.records[rec.id] = rec for src in set(rec.sources) | set(rec.derived_from): self.cited_by.setdefault(src, set()).add(rec.id) def _closure(self, target_id: str) -> set[str]: """Transitive set of artifacts whose provenance cites target_id.""" seen: set[str] = set() frontier = list(self.cited_by.get(target_id, set())) while frontier: node = frontier.pop() if node in seen or node == target_id: continue seen.add(node) frontier.extend(self.cited_by.get(node, set())) return seen def forget(self, target_id: str, *, allow_partial: bool = False) -> set[str]: if target_id not in self.records: raise ProvenanceClosureError( f"forget target {target_id!r} not present; cannot compute closure" ) closure = self._closure(target_id) # An artifact that cannot prove its erased-source contribution is # unrecoverable must be invalidated in full, not repaired. invalidated = {target_id} | closure # Guardrail: if any surviving artifact still cites something in the # invalidated set (i.e. closure was not actually closed), refuse. dangling = { art for art in self.records if art not in invalidated and (set(self.records[art].sources) | set(self.records[art].derived_from)) & invalidated } if dangling and not allow_partial: raise ProvenanceClosureError( f"forget({target_id!r}) would leave dangling provenance edges " f"from {sorted(dangling)}; closure incomplete — refusing to " f"report success on partial erasure" ) for rid in invalidated: rec = self.records.pop(rid, None) if rec is None: continue for src in set(rec.sources) | set(rec.derived_from): self.cited_by.get(src, set()).discard(rid) return invalidated ```