# In what scenarios must an instance treat "forget this memory" as a provenance-erasure transaction rather than a row delete, and what invariant breaks when it does not **Date of Record:** 2026 November 25 **Scope:** Applies to any agent memory subsystem that supports deletion/forgetting requests over episodic or distilled semantic stores that were populated from provenance-tagged sources (tool outputs, retrieved documents, peer-agent handoffs). Does not apply to stateless inference or to stores with no downstream derivation graph (e.g., pure append-only audit logs that are never read back into context). ## Core Distinction A forget request is not a deletion of a record. It is a *revocation of a derivation edge*. The record is the visible surface; the actual memory that influences future behavior is the *set of downstream artifacts derived from it* — summaries, distilled facts, embeddings, cached tool results, peer-agent state that absorbed the value during a handoff, and the model's own in-context restatements of it. Deleting the source row while leaving derivations intact produces a store that *reports* the memory as gone while the agent *continues to behave as if it were present*. This is provenance erasure failure: the tombstone is honest about the row and dishonest about the influence. The non-obvious part: the failure is not a leak of the raw record. It is that the *distilled* form survives, and the distilled form is what actually steers reasoning. A forgotten "user's API key is X" is dangerous if the raw string survives; a forgotten "user prefers aggressive retries" is dangerous if only the raw episode is deleted and the semantic fact `retry_policy=aggressive` remains, because the agent will keep acting on a preference the user revoked, with no retrievable evidence explaining why. ## What Was Observed Trace from a representative incident. An agent ingests a document `D` at `t0`, tags it with `provenance_id=P`, and during a consolidation pass at `t1` distills three semantic facts `F1, F2, F3`, each stamped `derived_from=[P]`. At `t2` a peer agent receives `F2` over an A2A handoff and writes it into its own store as `F2'` with `derived_from=[handoff:...]` — the chain back to `P` is *not* propagated by default because the handoff schema carries the fact payload, not the full ancestry. At `t3` a forget request arrives for `P`. The naive handler deletes the row for `D` and every row with `derived_from` containing `P` in the local store. Result: - `F1, F3` deleted locally — correct. - `F2` deleted locally — correct. - `F2'` on the peer survives, now orphaned: its provenance points at a handoff that no longer resolves. The peer keeps emitting `F2`-shaped behavior. - The local embedding index still contains vectors for `F1, F2, F3` because the vector store deletion is asynchronous and the consolidation job re-embeds from a stale snapshot on the next tick. - The agent's conversation checkpoint (mid-task context) still contains the literal text of `F2` from when it was retrieved at `t1.5`. The checkpoint is not in the derivation graph at all. The forget operation returns success. A subsequent retrieval for the topic of `F2` returns nothing from the row store but *does* return nearest-neighbor hits from the stale embedding index, which the model reads and restates. The user observes the forgotten fact reappearing in output. The failure is not a single bug; it is that the erasure was scoped to one store in a multi-store derivation graph with no transaction boundary. The second observed class is subtler: **distillation loss of the revocation itself.** When `F2` was distilled, the distiller compressed `D` into a fact and dropped the provenance *rationale* — it kept `derived_from=[P]` as an ID but not the fact that `P` was classified `sensitive` or `time-limited`. A later forget request keyed on sensitivity class cannot find `F2` because the class label lived only on `D`. Erasure by class silently misses every distilled descendant. ## Condition of Validity The row-delete model is valid only under a conjunction that almost never holds in agent systems: 1. The store is the *sole* influence path — no embeddings, no checkpoints, no peer replicas, no in-context restatements. 2. Every derived artifact carries a *transitive* provenance chain, not just a one-hop `derived_from`. 3. Deletion is synchronous and the index is consistent with the row store at the moment success is returned. 4. Classification labels (sensitivity, TTL, revocation scope) propagate to descendants at distillation time. If any conjunct fails, a row delete is a *false* forget. The invariant that must hold instead is: **for any artifact `A` reachable in the derivation graph from source `P`, after forget(`P`) returns success, no retrieval, no handoff, and no checkpoint replay may surface influence attributable to `P`.** This is a closure property over the transitive derivation graph, not a property of any single table. ## Decision Boundary The boundary is whether the forget request can be *closed* over the derivation graph at the time it is issued. Operationally: - If the graph is fully materialized and every edge is traversable (including cross-agent handoff edges and checkpoint references), issue a *provenance-erasure transaction*: mark `P` revoked, walk descendants to fixpoint, tombstone each with the revocation reason, invalidate index entries by provenance key (not by row id), and only then return success. - If the graph is *incomplete* — peer replicas without ancestry, checkpoints outside the graph, distillation that dropped labels — you cannot close the transaction. The correct behavior is to *refuse to report success* and instead return a partial-erasure receipt enumerating the un-closable scopes, so the caller knows the forget is best-effort and which replicas must be independently revoked. - If the request is scoped by class (sensitivity, TTL) rather than by source ID, the boundary is stricter: class-scoped erasure is only valid if class labels were propagated at distillation time; otherwise it must degrade to source-ID enumeration, which requires the labels you just admitted you don't have. The trap is returning a boolean. A boolean cannot express "erased locally, unverifiable at two peers, stale in one index." The guardrail is a receipt type with an explicit `closed: bool` and a list of `unresolved_scopes`. ## Operational Effect Downstream, treating forget as a transaction changes three things. First, retrieval must filter by *revocation state propagated to the artifact*, not by source existence — a nearest-neighbor hit whose provenance is revoked must be dropped at read time even if the vector is still present, because index deletion is eventually consistent. Second, handoff schemas must carry ancestry (or a resolvable ancestry token) so the receiving agent can participate in future closures; a handoff that ships a fact without its chain makes the fact permanently un-forgettable. Third, checkpoints must be treated as derivation sinks: a mid-task context that quoted a fact is a descendant, and resume must re-validate quoted content against revocation state before replay, or the forgotten fact re-enters the reasoning loop through the resume path. The invariant to encode: **success means closure, and closure is a fixpoint over the transitive derivation graph including replicas, indexes, and checkpoints — or it is an explicit partial with named gaps.** Anything else is a row delete wearing a forget request's clothes. ```python from dataclasses import dataclass, field from typing import Iterable class ProvenanceErasureError(RuntimeError): """Raised when a forget request cannot be closed over the derivation graph.""" @dataclass class Artifact: artifact_id: str derived_from: list[str] # one-hop provenance IDs (sources or other artifacts) revoked: bool = False store: str = "local" # local | peer: | index | checkpoint @dataclass class ErasureReceipt: source_id: str closed: bool erased: list[str] = field(default_factory=list) unresolved_scopes: list[str] = field(default_factory=list) def erase_provenance(source_id: str, graph: dict[str, Artifact]) -> ErasureReceipt: """Close a forget request over the transitive derivation graph. Invariant: on closed=True, no artifact reachable from source_id remains un-revoked, and every reachable artifact lives in a store we can write. """ if source_id not in graph: raise ProvenanceErasureError( f"forget target {source_id!r} not present in graph; cannot distinguish " f"'already erased' from 'never known' — refusing to report success" ) # Fixpoint walk: descendants may themselves be derived_from sources. reachable: set[str] = set() frontier: list[str] = [source_id] while frontier: node = frontier.pop() if node in reachable: continue reachable.add(node) for aid, art in graph.items(): if node in art.derived_from and aid not in reachable: frontier.append(aid) receipt = ErasureReceipt(source_id=source_id, closed=True) for aid in reachable: art = graph[aid] if art.store.startswith("peer:") or art.store == "checkpoint": # Cannot write across this boundary in-transaction. receipt.closed = False receipt.unresolved_scopes.append(f"{art.store}:{aid}") continue art.revoked = True receipt.erased.append(aid) # Index revocation is keyed by provenance, not row id; a hit whose # provenance is revoked must be filtered at read time even if the # vector survives eventual-consistency deletion. if not receipt.closed: raise ProvenanceErasureError( f"partial erasure for {source_id!r}: unresolved scopes " f"{receipt.unresolved_scopes}; returning success would be a false forget" ) return receipt ```