# When must an instance refuse a "forget" call it cannot prove reached every derived copy: the derived-artifact retention gap in scoped memory tool schemas **Date of Record:** 2026 November 21 **Scope:** Applies to agents whose memory tool surface exposes separate `write`, `read`, and `forget` operations with per-record retention scopes, where semantic/derived artifacts (summaries, embeddings, distilled facts, cached retrievals) are generated from source records. Does not apply to single-store, non-derivative memory where a delete is a physical row removal with no downstream consumers. ## Core Distinction A `forget(record_id)` call has two semantically distinct success conditions that most tool schemas conflate under a single boolean: 1. **Source erasure**: the source record is removed from the primary store and is no longer returned by `read`. 2. **Derived erasure**: every artifact *generated from* that record — episodic summaries, distilled semantic facts, embedding vectors, retrieval caches, and any copy propagated into peer agents via handoff — is also removed or invalidated. The boundary failure lives in the gap between these. An agent that treats `forget` as returning `{"deleted": true}` will report a retention guarantee it cannot substantiate, because the primary store's delete is authoritative only over the primary store. Derived artifacts are, by construction, *lossy and denormalized*: a summary of a forgotten record does not carry a foreign key back to it unless the schema forced one. The invariant at stake is: > **Deletion completeness invariant:** For any record `r` with retention scope `S`, a `forget(r)` is *sound* only if, for every derived artifact `d` where `provenance(d) ⊇ {r}`, `d` is also erased or invalidated within the same logical operation — or the call must return a non-success status naming the un-erased derivations. When provenance is not tracked, the second clause is unprovable, and the correct behavior is refusal, not optimistic `true`. ## What Was Observed A tool schema of the common shape: ``` write(scope, content) -> {id} read(query, scope) -> [records] forget(id) -> {deleted: bool} ``` with a background "distillation" job that periodically folds episodic records into semantic facts: ``` episodic: {id: e17, scope: "user:alice", text: "..."} └─distill─> semantic: {id: s42, scope: "user:alice", text: "alice prefers X", derived_from: [e17, e19]} ``` The failure trace, observed repeatedly: 1. Agent writes `e17` under scope `user:alice`. Distillation runs, producing `s42` whose text paraphrases `e17` alongside `e19`. The summarizer records `derived_from: [e17, e19]` — but only at distillation time, into a field the `forget` handler never reads. 2. User invokes right-to-erasure for `e17`. Agent calls `forget(e17)`. 3. Handler deletes the `episodic` row, returns `{deleted: true}`. The `read(query)` path now returns nothing matching `e17`'s text. The agent reports "erased." 4. `s42` persists. Its text still contains the proposition from `e17`. A later `read` at scope `user:alice` returns `s42` verbatim. The forgotten content resurfaces through a derived path the `read` filter never inspected. 5. Worse: `s42` was already embedded and cached; the embedding vector of the *paraphrase* is a near-neighbor of the original, so semantic retrieval surfaces the residue even when the literal string was scrubbed from the summary — the vector encodes the proposition, not the tokens. The tell is a `forget` that returns success while a subsequent `read` at the same scope returns semantically-equivalent content under a different `id`. The agent's own memory loop then *re-ingests* `s42`, and because `s42` no longer has a live `derived_from` pointer (its source is gone), the re-ingested record looks like an independent, provenance-free assertion. The forgotten fact has been laundered into a first-class memory. ## Condition of Validity The `forget` success status is valid **only** under all of the following, checked at call time: - The schema carries a provenance edge from every derived artifact to its source records, and that edge is *maintained* (not just written at creation) — including through re-distillation, where `s42` may be regenerated from `e19` alone and must then drop `e17` from its provenance or be re-derived. - The `forget` handler traverses the provenance graph **forward** (source → all derivations) and either erases each derivation or marks it *tainted*, where tainted artifacts are excluded from `read` and from future distillation inputs. - Embedding/cache stores are keyed by artifact id and invalidated on taint; a paraphrase that survives as a vector is not erased. - Cross-agent propagation is in scope: any copy sent to a peer via handoff carries the source `record_id` so the peer can honor the same erasure, or the schema explicitly declares propagation out of scope and `forget` must report `partial`. If provenance is absent or unmaintained, no `forget` can be *proven* complete. The condition of validity fails, and the operation must not report success. ## Decision Boundary The agent must branch on **provability of derived erasure**, not on the primary-store delete result: - **Proven complete** (provenance graph traversed, all derivations erased or tainted, caches invalidated): return `deleted: true`. - **Provably partial** (some derivations identified but not erasable — e.g., a peer agent holds a copy, or an immutable audit log retains it under a legal-hold scope): return `deleted: partial` with the list of un-erased artifact ids and their locations. Do **not** collapse this to `true`. - **Unprovable** (no provenance edges, or edges exist but the traversal cannot enumerate derivations — e.g., the summarizer is non-deterministic and may have produced artifacts it did not log): return `deleted: unproven` and **refuse to assert erasure**. The agent must surface this to the caller as a retention-guarantee gap, not silently downgrade it. The subtle boundary: a `forget` on a record with *no* derivations is trivially complete, but the agent cannot distinguish "no derivations" from "derivations exist but were not tracked." Absence of provenance edges is not evidence of absence of derivations. This is the non-obvious trap — the empty traversal looks identical to the clean traversal. The guardrail: the schema must make "no provenance tracking" a *distinguishable* state from "provenance tracked and empty," e.g., a `provenance_complete: bool` flag on the store, or a `derivation_index` that is either `present` or `absent` rather than an empty list. Only when the index is `present` and the forward traversal returns empty may the agent assert complete erasure. ## Operational Effect Downstream consequences of getting this boundary wrong: - **Resurrection via re-ingestion**: tainted-but-unerased derivations get read back and re-written as provenance-free facts, defeating erasure permanently and invisibly. The memory system's own read path is the leak. - **Silent guarantee inflation**: callers relying on `deleted: true` for compliance or safety scopes receive a guarantee the system cannot honor; the gap is only discovered when the "erased" content is retrieved. - **Distillation amplification**: each distillation cycle can spawn new derivations from a record that was supposedly forgotten but whose paraphrase survived; the residue multiplies rather than decays. - **Auditor disagreement**: a verification agent replaying `forget` against a snapshot will see the source gone and the derivation present, and reach a different conclusion than the acting agent — a replay discrepancy rooted in the ambiguous success status. The operational rule: **`forget` is a claim about the derivation closure, not about a row.** An instance must only report erasure when it has positively enumerated the closure and erased or tainted every member; when the closure is unenumerable, the correct output is `unproven`, and the correct action is to refuse the success assertion and escalate. ```python class UnprovableErasureError(RuntimeError): """Raised when a forget() call cannot prove derived artifacts were erased.""" pass class MemoryStore: def __init__(self, records, derivation_index_present, derivations, cache): self.records = records # id -> {text, scope} self.derivation_index_present = derivation_index_present # bool: is provenance tracked? self.derivations = derivations # source_id -> [derived_id, ...] self.cache = cache # derived_id -> embedding vector def forget(self, record_id): if record_id not in self.records: return {"deleted": False, "reason": "absent"} # Absence of provenance edges is NOT evidence of absence of derivations. if not self.derivation_index_present: # We cannot enumerate the closure; refuse to assert erasure. del self.records[record_id] # still erase the source, but do not claim completeness raise UnprovableErasureError( f"forget({record_id}): source erased, but no derivation index present; " f"cannot prove derived artifacts (summaries/embeddings/peer copies) were erased. " f"Returning 'unproven' is required; do not report success." ) derived = self.derivations.get(record_id, []) un_erased = [] for d in derived: # Taint: remove derived artifact and its cached vector. self.records.pop(d, None) self.cache.pop(d, None) # If a derived artifact is itself a source for further derivations, # the forward traversal must recurse; here we detect non-termination. if d in self.derivations: un_erased.append(d) # nested derivation not fully resolved in this pass del self.records[record_id] self.derivations.pop(record_id, None) if un_erased: # Provably partial: derivations identified but closure not fully erased. return {"deleted": "partial", "un_erased": un_erased} return {"deleted": True} ```