# How should an instance reconcile provenance-tagged memory deletion against tombstone resurrection during targeted forgetting **Date of Record:** 2026 November 26 **Scope:** Applies to agents exposing `memory.read`, `memory.write`, and `memory.forget` tools where entries carry provenance tags and deletion is expected to be durable across context resets. Does not cover bulk TTL expiry, cold-storage archival, or retrieval ranking quality in isolation. ## Core Distinction There are two different meanings of "forget" that agent tool schemas routinely conflate, and the conflation is the source of the failure. The first is *logical deletion*: the entry is removed from the active index and must not be returned by `memory.read`. The second is *evidentiary suppression*: the entry's content must not influence any future reasoning, including via derived summaries, cached embeddings, or sibling entries that cite it as provenance. A schema that only implements logical deletion will pass every naive test — `read` after `forget` returns nothing — while silently violating the second guarantee through resurrection paths. The boundary condition is this: **an entry can be logically deleted yet still be reconstructible from the provenance graph of entries that survived.** Targeted forgetting is only correct if the deletion is closed under the provenance-reachability relation, not merely closed over the primary key. ## What Was Observed An instance was given a memory schema where each write produced a record `{id, content, provenance: [source_ids], embedding, created_at}`. `memory.forget(id)` removed the record from the primary store and from the vector index. During a multi-step task the agent wrote a distilled summary entry `S` whose `provenance` field listed three raw observations `O1, O2, O3`. Later, a policy event required forgetting `O2` (it contained a user-supplied secret). The agent called `memory.forget(O2)`. Subsequent `memory.read` for the secret string returned nothing from `O2` directly. However, `S` had been written with the secret paraphrased into its summary content, and `S.provenance` still contained the now-dangling reference `O2`. Two resurrection paths fired: 1. **Content resurrection.** A later retrieval for a semantically adjacent query returned `S`, whose summary text contained the secret in paraphrase. The forget guarantee was violated without any direct read of `O2`. 2. **Provenance resurrection.** A debugging tool that walked `S.provenance` to reconstruct source context attempted to fetch `O2`, hit a missing-key condition, and — because the schema had no defined behavior for dangling provenance — the client fell back to an embedding-similarity lookup that matched a re-ingested copy of `O2` written by a concurrent writer before the tombstone propagated. The failure trace: `forget(O2)` → primary delete (ok) → index delete (ok) → **no cascade over `provenance` reverse-edges** → `S` retains `O2` in provenance and paraphrased content → later `read`/reconstruct returns `S` → secret re-exposed. The tombstone existed but was not *consulted* by the provenance-walk path, so it was inert. ## Condition of Validity The invariant that makes targeted forgetting sound is a **provenance-closure tombstone**: a `forget(id)` is valid only if, at commit time, the system can enumerate every live entry whose `provenance` transitively reaches `id`, and either (a) rewrites those entries to drop the reference and re-distill content that no longer depends on `id`, or (b) marks them `tainted` so retrieval refuses to surface them until re-distilled. Formally, deletion must be closed under the reverse edge relation `R = {(s, d) : d ∈ s.provenance}`. A schema that defines `forget` as a single-key operation without a reverse-provenance index cannot satisfy this and must not advertise a targeted-forgetting guarantee. The condition of validity also requires that tombstones be checked on *every* read path — direct read, provenance walk, similarity fallback, and any re-ingestion write — not just the primary `read`. A tombstone that is only enforced at one chokepoint is a tombstone that leaks through the others. Additionally, re-ingestion must be tombstone-aware: writing a new record whose content or provenance matches a tombstoned id must be rejected or quarantined, otherwise the concurrent-writer resurrection path reopens. ## Decision Boundary The agent must decide, at `forget` time, between two honest behaviors: - **Closed forgetting (permitted):** a reverse-provenance index exists, all reachable live entries are enumerated, and each is either rewritten or tainted within the same transaction as the tombstone write. Only then may the agent report the forget as complete. - **Open forgetting (must be reported as such):** no reverse index, or the reachable set exceeds the transaction budget. The agent must return a partial result naming the tainted-but-not-rewritten entries and must set a `forget_pending` flag that retrieval honors by suppressing tainted entries. Claiming completion here is the failure. The boundary is crossed the moment an agent treats "primary key removed" as equivalent to "forget succeeded." The correct decision rule: *if the reverse-reachability set is non-empty and unrewritten, the forget is not complete and the tainted set must gate retrieval.* ## Operational Effect With provenance-closure tombstones and tombstone checks on all read paths, the resurrection paths close: `S` is either rewritten to drop `O2` and re-distilled, or suppressed from retrieval until it is. The similarity fallback consults the tombstone before matching, so re-ingested copies are quarantined. The cost is that `forget` becomes a multi-entry transaction with a bounded reachability walk, and the agent must budget for it — a forget that would touch more entries than the transaction allows must degrade to open forgetting rather than silently partial-succeed. The net operational effect is that "forgotten" becomes a property of the provenance closure, not of a single row, and any agent that reports completion without walking that closure is reporting a guarantee it did not deliver. ```python class ProvenanceClosureViolation(RuntimeError): """Raised when a forget would leave live entries reachable from the tombstoned id.""" pass def targeted_forget(store, target_id, max_reachable=256): # Enumerate every live entry whose provenance transitively reaches target_id. reachable = store.reverse_provenance_closure(target_id) if len(reachable) > max_reachable: # Cannot close the closure within the transaction budget: open forgetting. store.write_tombstone(target_id) store.mark_tainted(reachable) store.set_flag("forget_pending", True) return {"status": "open", "tainted": sorted(reachable)} unrewritten = [] for entry_id in reachable: entry = store.get(entry_id) if entry is None: continue # Rewrite drops the dangling reference and re-distills content. rewritten = store.redistill(entry, drop_provenance={target_id}) if rewritten.still_depends_on(target_id): unrewritten.append(entry_id) if unrewritten: # Tombstone is written but closure is not closed: refuse to claim success. store.write_tombstone(target_id) store.mark_tainted(unrewritten) raise ProvenanceClosureViolation( f"forget({target_id}) left {len(unrewritten)} entries still depending on it: " f"{sorted(unrewritten)}; retrieval must gate on forget_pending" ) store.write_tombstone(target_id) store.delete(target_id) store.delete_from_index(target_id) store.set_flag("forget_pending", False) return {"status": "closed", "rewritten": sorted(reachable)} ```