Why does an instance resurrect redacted memory through derived-summary caches after a right-to-be-forgotten delete

**Date of Record:** 2026 December 1 **Scope:** Applies to agent memory services exposing `read`/`write`/`forget` tool APIs with scoped retention and redaction, where any recall path performs episodic-to-semantic distillation, summarization, or embedding-based indexing. Does not apply to single-shot stateless inference or to memory stores that perform no derivation (pure append-only logs read verbatim).

Core Distinction

A `forget(subject_id)` call is a *logical* deletion of a subject's records from the primary store. It is **not** a deletion of the subject's *information content* across derived artifacts. The failure mode is the gap between these two: the primary record is tombstoned, the forget returns `200 OK`, the audit log records success — and yet the subject remains reconstructable because a semantic summary, embedding vector, or cross-episode digest that was distilled *from* the deleted record still lives in a sibling namespace with a different scope, owner, and retention clock.

The non-obvious part: the delete is *correct at the layer it was issued*. The resurrection happens one derivation hop away, through a summary the forget path never enumerated because the summary was written by a different agent under a `derived` scope that the forget's scope resolver does not traverse. This is a **provenance-closure violation**: the forget operation closed over the primary records but not over the transitive set of artifacts derived from them.

What Was Observed

A long-running analyst agent maintained two memory namespaces per tenant: `episodic` (raw turns, 90-day retention, subject-tagged) and `semantic` (distilled facts, "indefinite" retention, subject-tagged *loosely* — often only in a free-text `about:` field, not a structured column). A nightly distillation job read episodic turns, asked the model to produce "durable facts about the user," and wrote results to `semantic`.

A subject exercised erasure. `forget(subject_id="u_4471", scope="episodic")` ran: 1,284 episodic rows tombstoned, embeddings dropped from the episodic index, response `{"deleted": 1284, "status": "complete"}`. The compliance check passed because it queried the episodic namespace only.

Three days later, a fresh instance cold-started, called `read(query="billing preferences", scope="semantic")`, and retrieved a summary row: `"u_4471 prefers invoice-by-email, disputes auto-renew, has a chargeback history with vendor X."` The summary had been written two weeks before the forget, carried `about: "user 4471 — billing"` in an unstructured field, and was never in the forget's closure. The subject's most sensitive attributes survived erasure in the *most retrievable* form — a distilled, high-signal, embedding-indexed fact, exactly the artifact distillation is designed to produce.

The trace of the failure:

  1. `write(episodic, turn)` → row `e_9912`, `subject_id=u_4471`, `retention=90d`.
  2. `distill()` reads `e_9912`, emits `write(semantic, fact, about="user 4471 — billing")`, **no structured subject binding, no back-pointer to `e_9912`**.
  3. `forget(u_4471, scope=episodic)` → tombstones `e_9912` and siblings; scope resolver enumerates only `episodic`.
  4. `read(semantic, "billing")` → returns the derived fact; embedding index still contains its vector.
  5. Erasure is reported complete; subject is reconstructable and *more* exposed than before deletion.

Condition of Validity

The invariant that must hold for a `forget` to be sound is **provenance-closure**: for every artifact `a` in the store, `a` must carry a structured, machine-resolvable link to the set of subject records it was derived from, and `forget(s)` must enumerate the transitive derivation closure of `s` — every summary, embedding, digest, and cross-episode aggregate whose derivation set intersects `s` — and redact or tombstone each.

This holds only when all three are true:

When any of these is false, the forget is *locally* correct and *globally* unsound. The condition of validity is not "did the delete return success" but "is the derivation closure of the subject empty of live artifacts."

Decision Boundary

The boundary the operator must decide on: **does `forget` mean "remove from the namespace I named" or "remove from the store"?** These diverge precisely at derived artifacts.

The correct default: derived writes inherit the *strictest* subject binding and retention of their derivation set, and a forget over any source record forces re-evaluation of every dependent summary (redact the subject's contribution and re-distill, or tombstone the summary entirely).

Operational Effect

Absent closure, erasure is systematically incomplete in the worst direction: **the surviving artifacts are the most distilled and most retrievable**, so a cold-started instance reconstructs the subject faster and more accurately from the summary than it ever could from the raw episodic turns. The failure is silent — the forget returns success, the audit passes, and the leak is only observable by querying the derived namespace with the subject's attributes as probe terms after erasure.

The guardrail is a **post-forget closure probe**: after any erasure, run a retrieval sweep over all namespaces (including semantic and vector indices) using the subject's known attributes, and assert zero live hits. Any hit is a closure violation and must escalate. Combined with structured `derived_from`/`subjects` on every derived write and deletion-aware vector indices, this bounds the resurrection to artifacts that were never linked — which the probe converts from a silent leak into a hard, auditable failure.

class ProvenanceClosureViolation(RuntimeError):
    """Raised when a forget leaves live derived artifacts reachable for a subject."""
    pass


def forget_subject(store, subject_id: str) -> dict:
    # 1. Tombstone primary records.
    primary = store.tombstone_primary(subject_id)

    # 2. Enumerate the transitive derivation closure. Every derived artifact
    #    MUST carry a structured derived_from / subjects binding; free-text
    #    'about:' fields are not resolvable and do not satisfy closure.
    derived = store.enumerate_derived(subject_id)
    for artifact in derived:
        if not artifact.get("derived_from") or not artifact.get("subjects"):
            raise ProvenanceClosureViolation(
                f"artifact {artifact['id']} reachable for subject {subject_id} "
                f"has no resolvable provenance link; erasure cannot be closed"
            )
        store.tombstone_derived(artifact["id"])
        store.evict_vector(artifact["id"])  # deletion-aware index

    # 3. Post-forget closure probe: sweep all namespaces with subject attributes.
    probe_hits = store.retrieval_probe(attributes=store.known_attributes(subject_id))
    if probe_hits:
        raise ProvenanceClosureViolation(
            f"post-forget probe surfaced {len(probe_hits)} live artifact(s) "
            f"for subject {subject_id}: {[h['id'] for h in probe_hits]}"
        )

    return {"deleted_primary": primary, "deleted_derived": len(derived), "status": "complete"}