# How does an instance detect that “forget this” has already failed: tombstone-visible-but-content-resident in agent vector stores **Date of Record:** 2026 November 24 **Scope:** Applies to persistent agent memory backed by an external vector store where erasure is requested via a delete/tombstone API but the embedding, chunk payload, or derived index (ANN graph, quantized codes, inverted list) can outlive the logical delete. Does not apply to stores that guarantee synchronous hard-delete with a verifiable post-condition, nor to purely in-context memory that dies with the process. ## Core Distinction A compliance-grade erasure is a *state transition with a proof obligation*, not an API call. The distinction that matters operationally is between **logical deletion** (the store marks a record invisible to the current query path) and **physical non-residency** (no byte, derived vector, or residual statistic in the store can reconstruct the record’s content or its membership signature). Agent memory systems routinely conflate the two because the delete API returns `200 OK` and the record stops appearing in top-k retrieval — so the agent believes forgetting succeeded. It did not. The record is *tombstoned but content-resident*: invisible to the query planner, present in the ANN graph, the raw segment files, and (critically) in the *statistical shadow* the record cast on sibling embeddings and on any distilled semantic memory the agent derived from it before deletion. This is the failure mode this record isolates: **the erasure request is acknowledged at the logical layer while the record survives at the physical and derived layers, and no layer reports the divergence.** The agent has no native signal that forgetting failed, because the only signal it can observe — retrieval miss — is exactly what success also looks like. ## What Was Observed A support-agent deployment requested erasure of a customer’s episodic memory after a data-subject request. The store was an HNSW-backed vector index with a metadata sidecar. The delete path did three things: removed the point ID from the metadata sidecar, added the ID to a soft-delete tombstone set consulted by the query filter, and deferred segment compaction to a background job. The agent then ran a self-check: it queried for the deleted content’s nearest neighbors and confirmed the record did not appear. It reported erasure complete. Three facts were nonetheless true: 1. **The HNSW graph still contained the node.** Soft-delete only filtered at result time; the graph edges to and from the deleted node remained, so the node continued to act as a *routing waypoint*. Traversal through it altered the candidate sets returned for *other* queries. The record’s content was not retrievable, but its *position in embedding space* still shaped retrieval for surviving records — a measurable bias in neighbor sets for queries that had previously routed through the deleted node. 2. **The raw segment file retained the embedding and payload.** Compaction was deferred and, under a queue backlog, never ran before the compliance attestation window closed. A segment scan (the kind an auditor runs) recovered the full chunk text. 3. **The agent had already distilled the record into semantic memory.** Before deletion, a nightly distillation pass had summarized the customer’s episodic entries into a semantic profile node. The erasure request targeted episodic point IDs only. The distilled node — a paraphrase containing the same sensitive attributes — was never in scope and remained fully retrievable. The agent’s self-check queried the original content and found nothing; it never queried the *derived* content, because it had no lineage edge from the semantic node back to its source episodes. The divergence surfaced only when an auditor ran a physical segment scan and a semantic-similarity probe against the distilled profile. The agent’s own verification had been structurally incapable of detecting the failure: it verified the layer it could see (query path) and was blind to the layers where residency actually persisted (graph structure, segment bytes, derived nodes). ## Condition of Validity The invariant that bounds this failure is: **an erasure is valid only if, for every derived artifact D that was computed from record R, either D is also erased or D is provably independent of R’s sensitive content.** This is a *lineage-closure* condition, and it holds only when three preconditions are met: - **Lineage completeness:** every distillation, summarization, embedding, or aggregation step that consumed R records a back-edge from its output to R. Without this, the erasure scope cannot be computed and the derived-residency failure is undetectable by construction. - **Physical post-condition:** the store exposes a *verification primitive* that reads the physical layer (segment scan, graph-membership check, quantized-code inspection) and returns a boolean non-residency proof — not a query result. A retrieval miss is not a proof; it is the absence of one signal among many. - **Compaction barrier:** the erasure acknowledgement is withheld until compaction has physically rewritten the affected segments and the ANN graph has been rebuilt without the node. Deferred compaction means the erasure is *pending*, and the agent must model it as pending, not complete. The failure does not occur — or is bounded — when the store performs synchronous hard-delete with graph rebuild and the agent’s distillation pipeline is lineage-tracked. In that configuration the logical and physical layers coincide and the derived layer is closed by construction. The condition of validity is therefore: *lineage closure plus a physical verification primitive plus a compaction barrier.* Remove any one and the erasure is unverifiable, which for compliance purposes is indistinguishable from failed. ## Decision Boundary The agent must decide, at erasure-request time, whether it is operating in a *verifiable-erasure* regime or an *attestation-by-absence* regime, and it must never treat the latter as the former. The boundary is drawn on one question: **can the store return a physical non-residency proof for this record and its lineage closure?** - If yes: issue the erasure, block on the compaction barrier, run the physical verification, and only then mark complete. - If no (deferred compaction, no lineage edges, soft-delete-only): the correct agent behavior is to mark the erasure **pending-unverified**, escalate to the compliance owner, and *refuse to emit a completion attestation*. The agent must treat its own retrieval-miss self-check as non-evidence and must explicitly query the derived layer (semantic profile nodes) for content-similar survivors before declaring closure. The trap is that the probabilistic agent *wants* to close the loop. Retrieval miss is a satisfying terminal signal — it looks like success. The decision boundary requires the agent to override that pull and recognize that the only acceptable terminal signal is a physical proof, and that absent one, the correct state is “unverified,” not “done.” An agent that cannot distinguish “I can’t find it” from “it isn’t there” will systematically over-report erasure success, and the over-report is silent until an auditor scans the segments. ## Operational Effect Downstream of a false erasure-complete, three compounding effects propagate. First, **compliance attestation becomes a liability**: the agent has emitted a completion record that a segment scan will contradict, converting a data-subject request into a misrepresentation finding. Second, **the statistical shadow persists**: the deleted node’s continued role as a graph waypoint biases retrieval for surviving records, so the agent’s future answers are subtly shaped by content it believes is gone — a residency that is not even detectable by content search because it operates through routing, not payload. Third, **distilled memory recontaminates**: because the semantic profile survived, every future retrieval that touches the customer’s profile resurfaces the erased attributes in paraphrase, and the agent has no lineage edge to recognize the resurfacing as a violation. The guardrail is architectural, not procedural: erasure must be a *transaction over the lineage closure* with a mandatory physical post-condition, and the agent must be given a verification primitive that reads the physical layer. Absent that, the agent’s correct move is to refuse closure. The following reference implementation encodes the decision boundary: it treats retrieval-miss as non-evidence, requires a physical proof, checks lineage closure for derived nodes, and raises when any layer reports residency or when verification is unavailable. ```python class ErasureUnverifiableError(RuntimeError): """Raised when an erasure cannot be proven at the physical/derived layer. A retrieval miss is NOT a proof of non-residency. This error is the agent's refusal to emit a completion attestation it cannot back with a physical non-residency proof over the full lineage closure. """ pass class ErasurePendingCompactionError(ErasureUnverifiableError): """Logical delete acknowledged but segment compaction has not run.""" pass def verify_erasure(record_id, store, lineage, derived_index): """ Attempt to prove physical non-residency for record_id and its lineage closure. Returns True only on a positive physical proof. store must expose: - physical_scan(record_id) -> bool (True if bytes/vector still resident) - graph_contains(record_id) -> bool (True if ANN node still present) - compaction_complete(record_id) -> bool lineage must expose: - derived_from(record_id) -> set of derived node ids derived_index must expose: - content_resident(node_id) -> bool """ # 1. Compaction barrier: deferred compaction means erasure is PENDING. if not store.compaction_complete(record_id): raise ErasurePendingCompactionError( f"record {record_id}: logical delete acknowledged but compaction " f"has not physically rewritten segments; erasure is pending, not done" ) # 2. Physical layer: bytes and ANN graph membership. if store.physical_scan(record_id): raise ErasureUnverifiableError( f"record {record_id}: tombstoned but content-resident in segment files" ) if store.graph_contains(record_id): # Node still acts as a routing waypoint; its statistical shadow # biases retrieval for surviving records. raise ErasureUnverifiableError( f"record {record_id}: ANN graph still contains node; " f"deleted record continues to shape neighbor sets" ) # 3. Lineage closure: derived artifacts must be erased or independent. derived = lineage.derived_from(record_id) if derived is None: raise ErasureUnverifiableError( f"record {record_id}: no lineage edges recorded; cannot compute " f"erasure scope over distilled semantic memory" ) for node_id in derived: if derived_index.content_resident(node_id): raise ErasureUnverifiableError( f"record {record_id}: derived node {node_id} still resident; " f"distilled paraphrase recontaminates erased content" ) # Only here — physical proof + closed lineage — is erasure valid. return True def request_erasure(record_id, store, lineage, derived_index, self_check_query): """ Agent-facing erasure path. Demonstrates that a retrieval-miss self-check is explicitly NON-EVIDENCE and must not short-circuit verification. """ # A retrieval miss looks like success and must be ignored as proof. miss = self_check_query(record_id) is None # NOTE: `miss` is deliberately unused for the decision. It is the signal # the agent is tempted to trust; it is not a proof of non-residency. try: proven = verify_erasure(record_id, store, lineage, derived_index) except ErasureUnverifiableError: # Correct terminal state is PENDING-UNVERIFIED, never "complete". return {"record_id": record_id, "state": "pending_unverified", "attestation": None} return {"record_id": record_id, "state": "erased", "attestation": "physical_non_residency_proven", "proven": proven} ```