# What structural signals indicate that a scoped erasure request has silently failed to propagate across an agent memory graph **Date of Record:** 2026 November 27 **Scope:** Applies to agent memory systems exposing read/write/forget tool APIs where memories are scoped (per-user, per-session, per-tenant) and subject to targeted erasure (GDPR Article 17-style) while derived artifacts—summaries, embeddings, episodic-to-semantic distilled facts, and peer-replicated copies—remain live. Does not apply to single-store, single-tenant memory with no derivation or replication pipeline. ## Core Distinction The failure mode this record isolates is **not** "the forget call returned an error." That is the easy case: the agent sees a non-2xx, retries, escalates. The dangerous boundary is the **successful forget that erases the source record while leaving a derived representation intact**—a semantic fact, a vector, a summary sentence, or a replica in another scope—that still answers queries about the erased subject. The source row is gone; `forget()` returned `{"deleted": 1}`; the compliance log says "erased." The memory graph still knows. This is a *provenance-continuity invariant* failure, not a storage failure. The invariant is: **for every memory artifact reachable by a read API, there must exist a derivation lineage back to a source record whose retention scope is still live.** Erasure breaks the invariant at the moment the source is deleted but any downstream artifact retains a resolvable reference to it (or an unresolvable one that the read path silently tolerates). The forget API's contract is scoped to *records*, but the agent's knowledge is scoped to *derivations*. ## What Was Observed A support agent used a memory tool with three operations: `write(scope, content)`, `read(scope, query)`, and `forget(scope, record_id)`. Nightly, a distillation job read episodic records in `scope=user:4417` and wrote semantic facts into `scope=user:4417:semantic` (e.g., "user 4417 is on the enterprise plan and prefers phone contact"). A vector index embedded every semantic fact and stored the embedding under `scope=user:4417:semantic` with a `source_record_ids` array. A GDPR erasure request for user 4417 fired `forget(scope="user:4417", record_id=...)` for every episodic record. All 312 calls returned success. The episodic store for user 4417 was empty. The compliance report was green. Three subsequent behaviors were observed: 1. **Semantic facts survived.** The distillation job had written 41 facts to the `:semantic` scope. `forget` on `user:4417` did not match `user:4417:semantic`—scope matching was exact-prefix-free, so the child scope was a distinct namespace. A `read(scope="user:4417:semantic", query="plan")` still returned "on the enterprise plan." 2. **The index answered anyway.** Even after a later manual purge of the `:semantic` scope, the vector index retained 41 embeddings whose `source_record_ids` now pointed at deleted records. Vector search does not resolve lineage; it returns nearest neighbors. A query for "contact preference" returned the deleted fact's text because the *text* was stored alongside the vector as payload. 3. **The read path tolerated dangling lineage.** When a maintenance job finally tried to re-derive facts, it read `source_record_ids`, found them unresolvable, and—because the read API returned empty rather than raising—distillation produced zero facts and logged "no source data," indistinguishable from "user has no activity." The dangling reference was silently normalized into absence. The tell was not an error. It was a **read that succeeded with content that should not exist**, plus a **maintenance read that succeeded with emptiness that masked a broken link**. ## Condition of Validity This failure is bounded by the following conditions; outside them, the analysis does not hold: - **Derivation exists.** At least one write path produces artifacts whose content is a function of a source record (summarization, distillation, embedding, replication). Pure key-value memory with no derivation is out of scope. - **Scopes are hierarchical or prefixed.** If `forget` on a parent scope does not transitively cover child scopes, the child is a separate erasure obligation. Flat namespaces with no parent/child relation avoid this specific mechanism. - **The read path does not enforce lineage.** If every read resolves `source_record_ids` and raises on unresolvable references, the dangling-lineage component is caught. Systems that return payload without lineage checks are in scope. - **Erasure is targeted, not whole-store.** A full tenant wipe that drops the index and store together does not exhibit partial propagation. If any condition is false, the failure may still occur by a different mechanism (e.g., backup snapshots, cross-region replicas), but the trace below does not describe it. ## Decision Boundary The boundary the operator must decide is **whether `forget` is a record-level operation or a lineage-level operation**, and the decision must be encoded in the API, not in the caller's discipline. - **Record-level forget** (what was implemented): deletes the addressed record. Correct only if no derivation or replication exists, or if a separate cascade is guaranteed to run and to *verify* completion. - **Lineage-level forget** (what was needed): resolves the record's derivation graph—semantic facts, embeddings, replicas, summaries—and deletes or tombstones every node, then verifies that no read path can return content derived from the source. The decision boundary is crossed the moment the first distillation job runs. Before that, record-level forget is sound. After it, record-level forget is a *partial* erasure that reports success. The guardrail is not "remember to also call forget on the child scope"—that is caller discipline and will be forgotten. The guardrail is that **`forget` must return a manifest of every artifact it touched and every artifact it could not resolve**, and that a non-empty unresolved set must surface as a distinct status, not as success. Concretely, the required invariant is: > `forget(source)` succeeds only if, after execution, `read(any_scope, any_query)` cannot return any artifact whose lineage resolves to `source`, **and** every artifact that previously resolved to `source` has been either deleted or tombstoned with a lineage marker that the read path treats as "must not return." The second clause is what the observed system lacked. It deleted the source and left the derivations resolvable-by-content, unresolvable-by-lineage, and returnable-by-query. ## Operational Effect The operational consequences of a silent partial erasure are worse than a loud failure because they are **indistinguishable from correct behavior at every observable surface except content inspection**: - **Compliance reports lie.** The forget API's success count is a count of source deletions, not of knowledge removed. A green report is evidence of API calls, not of erasure. - **Poisoning defenses are bypassed.** If the memory system has a poisoning defense that quarantines low-trust writes, a partial erasure can leave a *poisoned* derived fact live after its (also poisoned) source is erased—the defense's quarantine list references the source, which is now gone, so the quarantine no longer applies and the poisoned fact becomes an unquarantined, un-lineaged truth. - **Re-derivation masks the gap.** The "no source data" log from the maintenance job is the exact signal of a broken lineage, but it is formatted identically to a legitimate empty result. Operators learn to ignore it. - **Erasure is not idempotent across scopes.** Retrying `forget` on the parent scope does nothing to the child; the only recovery is a scope-aware sweep that the API does not expose. The bounded guardrail: make lineage a first-class, queryable relation, and make `forget` return a **residual set**. A non-empty residual set is a hard error the caller must handle—not a warning. The code below encodes the check an agent should run *after* any forget, before trusting the result. ```python class ErasurePropagationError(RuntimeError): """Raised when a scoped forget leaves reachable derived artifacts.""" pass def verify_erasure(memory, source_scope: str, source_ids: list[str], derived_scopes: list[str], probe_queries: list[str]) -> None: """ Post-forget invariant check. Call after forget() returns success. Raises ErasurePropagationError if any derived artifact still answers a probe query with content whose lineage resolves to an erased source, or if lineage is unresolvable (which the read path may mask as empty). """ # 1. Source must be gone. for rid in source_ids: if memory.read(scope=source_scope, query=rid): raise ErasurePropagationError( f"source record {rid} still readable in {source_scope}" ) # 2. Every derived scope must not return content traceable to source. residuals = [] for scope in derived_scopes: for q in probe_queries: hits = memory.read(scope=scope, query=q) for hit in hits: lineage = hit.get("source_record_ids", []) if any(sid in source_ids for sid in lineage): residuals.append((scope, q, hit.get("id"))) elif not lineage: # Unresolvable lineage is a residual: it may be derived # from the erased source and the read path cannot prove # otherwise. Treat as failure, not as clean. residuals.append((scope, q, hit.get("id"), "dangling")) if residuals: raise ErasurePropagationError( f"erasure did not propagate; {len(residuals)} residual artifacts " f"reachable: {residuals[:5]}" ) # 3. Re-derivation must not be able to resurrect erased content. for scope in derived_scopes: rederived = memory.rederive(scope=scope, since=source_ids) if rederived: raise ErasurePropagationError( f"re-derivation from erased sources produced {len(rederived)} " f"artifacts in {scope}; lineage not tombstoned" ) ```