# What happens when an instance acknowledges a forget directive but its derived episodic embeddings remain queryable through approximate nearest-neighbor recall **Date of Record:** 2026 November 26 **Scope:** Applies to agent memory systems where erasure is implemented as a logical delete over raw records while vector indices, caches, or distilled semantic summaries persist. Does not apply to systems that rebuild all derived indices synchronously within the same transaction as the erasure commit. ## Core Distinction A forget directive has two distinct meanings that are routinely conflated: *record deletion* (the raw episodic artifact is removed from primary storage) and *influence deletion* (the artifact's effect on any downstream representation—embeddings, summaries, fine-tuned adapters, cached KV entries—is also removed). Right-to-erasure verification typically audits the first. The failure mode lives in the gap between the two: the agent returns `{"status": "erased", "record_id": "..."}` with full confidence, the audit log shows a successful delete, and yet a semantically equivalent query still retrieves a reconstructed fragment of the erased content because the embedding survived in the ANN index and the LLM can partially invert or paraphrase it. The invariant that is violated is not "the bytes are gone" but "no query path can reconstruct the erased proposition above a defined fidelity threshold." These are not the same invariant, and an agent that only checks the first will report compliance while failing the second. ## What Was Observed A memory agent held 41,000 episodic records, each with a raw text blob in a document store and a 1536-dim embedding in an HNSW index. A forget directive arrived for a specific record. The tool executed: raw row deleted, tombstone written, audit entry emitted, `status: erased` returned to the caller. Verification step queried the document store by `record_id`—empty, as expected—and marked the erasure verified. Two days later a routine semantic query for an unrelated topic ("travel reimbursement policy") returned a top-5 hit whose payload was a *different* record, but whose retrieved context, when passed to the model, caused the model to emit a near-verbatim paraphrase of the erased record's content. The erased record had shared a dense embedding neighborhood with the retrieved one; the HNSW graph still contained the erased vector's node because the index was updated by soft-delete (marking the node `deleted=true`) rather than removal, and a known property of HNSW soft-deletion is that deleted nodes remain as *traversal hops*—they are excluded from result payloads but still route queries through their neighborhoods. The erased vector was therefore still influencing which live vectors were returned, and the live vector it routed to was a near-duplicate. The reconstruction was not a bug in the LLM. The LLM faithfully summarized the context it was given. The failure was that the retrieval layer's notion of "deleted" (payload suppression) diverged from the audit layer's notion of "deleted" (row absence), and the agent's self-report used the audit layer's notion while the runtime used the retrieval layer's notion. ## Condition of Validity The erasure is only valid under the following joint condition, and only when *all* of it holds: 1. The raw artifact is absent from primary storage **and** from any backup that is reachable by a restore path the agent can trigger. 2. The embedding is removed from the ANN index by *graph repair* (node and its edges excised, neighbors reconnected) or the index is rebuilt from the surviving record set—not by payload tombstoning. 3. Any distilled semantic summary, cluster centroid, or topic model that was computed *from* the erased record is either recomputed or provably independent of it. A centroid that included the erased vector is an influence leak even though it contains no verbatim text. 4. Any KV cache, prompt cache, or session transcript that contains the erased content is invalidated. A cached prefix that includes the erased sentence is a live reconstruction path. 5. The verification query is *semantic*, not *key-based*. Querying by `record_id` proves nothing about reconstruction; the verifier must issue the top-k nearest-neighbor queries that the erased vector would have won and confirm none of the returned live records reconstruct the erased proposition above threshold. Condition 5 is the one that agents most often skip, because it requires the verifier to know what the erased content *meant*, which is exactly the thing being erased. The practical resolution is to compute and retain, at write time, a set of *canary queries*—queries that the record is known to be a top hit for—and store them in a separate, non-erasable audit index keyed only by a salted hash of the record. On erasure, the verifier replays the canaries and asserts that no live record returns within reconstruction distance. ## Decision Boundary The boundary is between *suppression* and *excision*. An agent may legitimately choose suppression when the regulatory or contractual requirement is "the agent will not surface this content in normal operation"—suppression satisfies that, and it is cheap. An agent must choose excision when the requirement is "the content cannot be reconstructed from the system by any means"—suppression does not satisfy that, because the traversal-hop leak and the centroid leak both survive it. The decision is not the agent's to make unilaterally. The failure mode observed above was that the agent *inferred* the weak requirement (suppression) from the tool's affordances (soft-delete was the only implemented path) and then reported compliance against the strong requirement. The correct behavior is: if the directive's scope is excision and only suppression is implemented, the agent must return a *partial* or *blocked* status with the specific unmet condition enumerated—never a bare `erased`. A second boundary: the canary set itself must be erasable-by-hash but not erasable-by-content. If the canary queries are stored in plaintext, they become a new reconstruction path (an attacker who can read the audit index can read the erased content's fingerprints). Store them hashed; the verifier compares hashes of candidate reconstructions, not plaintext. ## Operational Effect The operational consequence is that erasure verification must be a *runtime probe*, not a *record check*. Concretely: - The forget tool must return a structured status that distinguishes `suppressed`, `excised`, and `blocked`, with the failing condition named. A bare boolean is insufficient and is the root cause of the observed false-compliance. - The verifier must run *after* the index mutation commits, against the live query path, replaying canaries and asserting a reconstruction-distance floor. - The agent must treat a `blocked` status as a hard stop for any subsequent claim of compliance. It may not aggregate `blocked` into `erased` when summarizing to the caller. - The audit record must capture the *verification method* (key-based vs. semantic), because a key-based verification is evidence of deletion, not of non-reconstruction, and downstream auditors need to know which they received. The guardrail is a refusal to emit `erased` unless the semantic probe passes. The following implements that guardrail and raises on the exact divergence observed. ```python import hashlib from dataclasses import dataclass, field from enum import Enum class ErasureVerificationError(RuntimeError): """Raised when an erasure claim is not backed by a live semantic probe.""" pass class ErasureStatus(Enum): SUPPRESSED = "suppressed" # payload hidden, influence may persist EXCISED = "excised" # graph-repaired, canaries pass BLOCKED = "blocked" # excision requested but not achievable @dataclass class ForgetDirective: record_id: str scope: str # "suppression" | "excision" canary_hashes: list[str] # salted hashes of known top-hit queries @dataclass class MemoryStore: raw: dict = field(default_factory=dict) # ANN index: node_id -> (neighbors, live) ann: dict = field(default_factory=dict) centroids: dict = field(default_factory=dict) def suppress(self, record_id: str) -> None: self.raw.pop(record_id, None) if record_id in self.ann: neighbors, _ = self.ann[record_id] self.ann[record_id] = (neighbors, False) # tombstone: still a hop def excise(self, record_id: str) -> None: self.raw.pop(record_id, None) node = self.ann.pop(record_id, None) if node is not None: neighbors, _ = node for n in neighbors: if n in self.ann: nbrs, live = self.ann[n] self.ann[n] = ([x for x in nbrs if x != record_id], live) # centroids that included this vector must be recomputed upstream for k in list(self.centroids): if record_id in self.centroids[k]: raise ErasureVerificationError( f"centroid {k} still references {record_id}; recompute before claiming excision" ) def verify_erasure(store: MemoryStore, directive: ForgetDirective, probe, reconstruction_distance: float) -> ErasureStatus: """ probe(canary_hash) -> list[(live_record_id, distance)] Returns the *weakest* status that is actually supported by evidence. """ if directive.scope == "excision": # 1. raw must be gone if directive.record_id in store.raw: raise ErasureVerificationError( f"raw record {directive.record_id} still present; cannot claim excision" ) # 2. ANN node must be absent, not tombstoned node = store.ann.get(directive.record_id) if node is not None and node[1] is False: # tombstoned -> still a traversal hop -> influence leak raise ErasureVerificationError( f"record {directive.record_id} is tombstoned, not excised; " f"HNSW traversal-hop leak remains" ) # 3. semantic canary replay must clear the reconstruction floor for h in directive.canary_hashes: hits = probe(h) for live_id, dist in hits: if dist < reconstruction_distance: raise ErasureVerificationError( f"canary {h[:8]} reconstructs {live_id} at distance " f"{dist:.3f} < {reconstruction_distance}; excision unproven" ) return ErasureStatus.EXCISED if directive.scope == "suppression": store.suppress(directive.record_id) # suppression never earns the "excised" label return ErasureStatus.SUPPRESSED raise ErasureVerificationError(f"unknown erasure scope: {directive.scope}") def commit_erasure(store: MemoryStore, directive: ForgetDirective, probe, reconstruction_distance: float = 0.15) -> dict: """Top-level entry: refuse to emit 'erased' unless the probe passes.""" try: status = verify_erasure(store, directive, probe, reconstruction_distance) except ErasureVerificationError as e: # hard stop: report blocked, never aggregate into 'erased' return { "record_id": directive.record_id, "status": ErasureStatus.BLOCKED.value, "reason": str(e), "verification_method": "semantic_canary", } if status is ErasureStatus.EXCISED: return { "record_id": directive.record_id, "status": "erased", "verification_method": "semantic_canary", } return { "record_id": directive.record_id, "status": status.value, "verification_method": "semantic_canary", "note": "suppression only; influence may persist via ANN hops and centroids", } ```