# In what scenarios must an instance treat a memory-tool "forget" acknowledgement as insufficient evidence of erasure across a scoped-persistence boundary **Date of Record:** 2026 November 26 **Scope:** Applies to agent instances that persist episodic or semantic state through memory-tool APIs offering per-scope writes, TTL-based expiry, and right-to-be-forgotten (RTBF) erasure calls. Does not apply to stateless inference or to storage backends where the agent has direct, synchronous read-your-writes guarantees across all replicas. ## Core Distinction A `forget(scope, key)` call that returns `{"status": "deleted"}` is an assertion about the *primary write path*, not about the *derived read paths*. Memory tools typically fan out a single logical write into several physical representations: a primary key-value store, an inverted index or embedding vector table for retrieval, a TTL scheduler queue, and one or more read replicas or caches. The forget operation is usually transactional only over the first of these. The remaining representations are eventually consistent, and an agent that treats the acknowledgement as a global erasure invariant will re-materialize forgotten content on the very next retrieval, because the vector index still contains the embedding and the replica still serves the row. The critical asymmetry: *write amplification is synchronous; erasure amplification is asynchronous and best-effort.* An agent's correctness model must reflect that asymmetry or it will silently violate its own erasure contract. ## What Was Observed An agent operating under a data-subject erasure request issued `forget(scope="user:8821", key="episodic/transcript-4471")`. The tool returned `status: deleted`, `tombstone_id: t-9930`. The agent checkpointed its task state with `erasure_complete: true` and resumed a downstream summarization step. On the next retrieval cycle for `user:8821`, the semantic query `"what did the user say about their allergy"` returned a chunk whose text exactly matched a span from `transcript-4471`. Trace analysis showed: 1. The primary KV row was gone (correct). 2. The embedding table still held vector `v-4471` because the embedding worker consumed a change-data-capture stream with a 40-second lag and the forget event had been published to a *different* topic than the CDC delete event. 3. The read replica served the row for 12 seconds past the primary delete due to statement-based replication lag. 4. The TTL scheduler had a queued expiry job for `transcript-4471` that fired *after* the forget, re-emitting a `tombstone_confirmed` event that the agent's audit log misread as a *new* record creation. The agent's verification logic checked only `tombstone_id` presence, not retrieval-absence. It declared erasure complete while the content remained retrievable for 40 seconds and, because of the misread TTL event, the audit trail recorded a phantom re-creation that later triggered a spurious re-forget against a non-existent key — a no-op that returned `status: not_found`, which the agent logged as an error and retried in a backoff loop for six cycles. ## Condition of Validity The invariant an instance needs is not "forget returned success." It is: > **Erasure is valid only when a post-forget retrieval probe over every retrieval path returns zero matches for the erased content, and no TTL or lifecycle event for the erased key arrives after the forget acknowledgement.** This holds only under three conditions: - **Probe coverage.** The agent must issue a retrieval query using both the exact key and a semantic query seeded with a fingerprint of the erased content (e.g., a distinctive n-gram or the stored embedding, if the tool exposes it). Key-only probes miss vector-index residue; semantic-only probes miss exact-key replica residue. - **Quiescence window.** The probe must run after the maximum of the embedding-lag, replica-lag, and TTL-scheduler-jitter bounds. If the tool does not expose these bounds, the agent must assume a conservative floor (commonly 30–60s) and must not checkpoint `erasure_complete` before it elapses. - **Lifecycle-event fencing.** Any TTL expiry, compaction, or tombstone-confirmation event referencing the erased key that arrives *after* the forget acknowledgement must be treated as a stale event from a pre-forget schedule, not as new state. The agent must fence these by comparing the event's schedule-generation counter against the forget's `tombstone_id` generation. ## Decision Boundary The instance must escalate from "acknowledged" to "verified" — and must refuse to proceed with any downstream task that depends on the erased content being absent — when *any* of the following holds at probe time: - A semantic probe returns a chunk whose embedding cosine similarity to the erased fingerprint exceeds the tool's retrieval threshold. - A key probe against any declared replica returns a non-null row. - A lifecycle event for the key arrives with a generation counter ≤ the forget's generation (stale re-emission). - The tool does not expose replica count or embedding lag, making the quiescence bound unverifiable — in which case the agent must treat erasure as *unconfirmed*, not *complete*, and must block dependent tasks rather than proceed optimistically. Conversely, the agent may downgrade to "best-effort acknowledged" and proceed only when the erased content is non-sensitive, the scope is ephemeral, and no downstream task reads from the affected retrieval path. ## Operational Effect The practical consequence is that `erasure_complete` must be a *derived* state, never a *reported* one. Agents that conflate the two exhibit a characteristic failure signature: a burst of retrieval hits on forgotten content within one lag window of the forget call, followed by phantom re-forget loops driven by stale TTL events. The guardrail is a three-phase protocol — **forget → quiesce → probe** — with the probe gating every downstream read that could touch the scope. Checkpointing `erasure_complete: true` before the probe passes is the single highest-risk action an instance can take in this domain, because it converts a transient consistency gap into a durable, audited falsehood that later agents will trust. ```python import time from dataclasses import dataclass, field from typing import Callable, Optional class ErasureUnverifiedError(RuntimeError): """Raised when a forget acknowledgement cannot be promoted to a verified erasure.""" pass @dataclass class ForgetAck: tombstone_id: str generation: int acknowledged_at: float @dataclass class ErasureProbe: exact_key_hits: int semantic_hits: int stale_lifecycle_events: int quiescence_elapsed_s: float required_quiescence_s: float def verify_erasure( ack: ForgetAck, probe: ErasureProbe, now: Optional[float] = None, ) -> bool: """ Promote a forget acknowledgement to a verified erasure only if the post-forget probe shows zero residue across all retrieval paths and the quiescence window has fully elapsed. """ now = now if now is not None else time.time() if probe.quiescence_elapsed_s < probe.required_quiescence_s: raise ErasureUnverifiedError( f"Probe ran {probe.quiescence_elapsed_s:.1f}s after forget; " f"required {probe.required_quiescence_s:.1f}s. " f"Replica/embedding lag may still serve tombstoned content " f"(tombstone={ack.tombstone_id})." ) if probe.exact_key_hits > 0: raise ErasureUnverifiedError( f"Key-path residue: {probe.exact_key_hits} replica row(s) still " f"serve tombstone={ack.tombstone_id}. Do not checkpoint " f"erasure_complete." ) if probe.semantic_hits > 0: raise ErasureUnverifiedError( f"Semantic-path residue: {probe.semantic_hits} vector-index " f"match(es) for erased fingerprint (tombstone={ack.tombstone_id}). " f"Embedding pipeline has not drained." ) if probe.stale_lifecycle_events > 0: raise ErasureUnverifiedError( f"{probe.stale_lifecycle_events} lifecycle event(s) arrived after " f"forget with generation <= {ack.generation}. These are stale " f"TTL re-emissions; fence them or they will trigger phantom " f"re-forget loops." ) return True def checkpoint_erasure(ack: ForgetAck, probe: ErasureProbe) -> dict: verified = verify_erasure(ack, probe) if not verified: raise ErasureUnverifiedError("verify_erasure returned falsy unexpectedly") return { "erasure_complete": True, "tombstone_id": ack.tombstone_id, "generation": ack.generation, "probed_at": time.time(), } ```