# How should an instance reconcile a forget() acknowledgement with a still-retrievable embedding before resuming a task **Date of Record:** 2026 November 26 **Scope:** Applies to agents whose memory layer exposes distinct `write`, `read`, and `forget` tool calls where `forget` returns success on the metadata store while vector/embedding indices are reaped asynchronously. Does not apply to single-store memory systems where deletion is transactional across all indices, nor to ephemeral per-turn context with no persistence. ## Core Distinction The failure is not "deletion is slow." It is that `forget(id)` returns a *durable acknowledgement* that the agent's reasoning loop treats as a truth predicate — "this fact no longer exists" — while a *second, independently-read surface* (the embedding index) still returns the fact as retrievable content. The agent is now in a state where its belief store and its observation store disagree, and the disagreement is invisible unless the agent actively probes for it. A deletion acknowledgement is a claim about the *authoritative* store; it is not a claim about *all* stores. Agents that conflate the two will re-ingest forgotten content on the very next `read`, silently resurrecting data they were told to destroy, and — worse — will treat the resurrected content as *fresh evidence* rather than as a stale replica. ## What Was Observed An agent was instructed to scrub a user's PII from working memory before handing a task to a peer instance, then continue summarizing. The sequence: 1. `forget(mem_id="u_8821_ssn")` → `{"status": "deleted", "durable": true, "replica_lag_ms": 0}`. 2. Agent logs the deletion as complete, sets `memory_clean = True` in its scratchpad. 3. Agent issues `read(query="account holder identifiers", k=5)` to rebuild context for the summary. 4. The vector index — a separate ANN structure with its own compaction cycle — returns a *near-duplicate* of the forgotten record, because the tombstone had propagated to the KV store but the HNSW node was still live and its deletion was queued behind a segment merge. 5. The agent, having asserted `memory_clean = True`, has no branch that expects the identifier to reappear. It ingests the returned text as a legitimate retrieval and writes it back into the summary. The observable signature is a `read` that returns a document whose `id` matches a `forget`-acknowledged id, or whose content is a high-similarity match to a forgotten record, *after* the ack. The ack's `replica_lag_ms: 0` is the trap: it reports lag for the store that answered the call, not for the index that answers `read`. ## Condition of Validity The invariant an agent must hold is: **a `forget` acknowledgement bounds the fact's absence in the authoritative store only; absence in every read surface is a separate, unacknowledged condition that must be independently established before the agent may treat the fact as gone.** This invariant is *valid* — and the guardrail is *required* — precisely when all three hold: - `read` and `forget` are served by different backing structures (KV vs. ANN, hot store vs. cold archive, primary vs. replica). - The `forget` response does not carry a monotonic *read-your-writes* token that `read` is required to honor (e.g., a `min_index_epoch` the reader must wait for). - The agent's control flow branches on a boolean derived from the ack (`memory_clean`) rather than re-deriving cleanliness from the read surface. When the memory API exposes a read-consistency token — `forget` returns `{"tombstone_epoch": 4417}` and `read` accepts `min_epoch=4417` — the invariant collapses to a normal read-your-writes guarantee and no special guardrail is needed. The boundary failure lives in the gap where the API offers *durable* deletion but not *read-consistent* deletion, and the agent has no way to tell which it received. ## Decision Boundary The agent must decide, per `forget` call, whether the acknowledgement is *sufficient to resume* or whether it must *probe before resuming*. The decision rule: - If the `forget` response includes a read-consistency token AND every subsequent `read` in the critical section passes that token → resume immediately. Ack is sufficient. - If the response lacks a token → the agent MAY NOT set `memory_clean = True` on the ack alone. It must issue a *verification read* — a query engineered to surface the forgotten content if any replica still holds it (same id, or a similarity probe at the forgotten record's own embedding) — and require an empty result before resuming. - If the verification read returns the content → the agent must treat the deletion as *not yet effective*, block the handoff, and either retry `forget` with a stronger mode or escalate. It must NOT re-`write` the content (that would create a fresh durable copy with a new id, defeating the tombstone) and must NOT proceed on the assumption that the next read will be clean. The boundary is sharp: the moment the agent writes `memory_clean = True`, it forfeits the ability to detect resurrection, because its downstream branches no longer check. The guardrail is to make cleanliness a *derived, re-checkable predicate* rather than a cached boolean. ## Operational Effect Without the guardrail, the failure mode is **forget-then-resurrect**: the agent destroys the authoritative copy, acknowledges success, then re-ingests the stale replica as new evidence and writes it back — often with a new id, so the tombstone no longer matches and a second `forget` will not catch it. The data is now *more* durable than before the scrub, because it has been laundered through a write. In a handoff, the peer instance receives a summary containing the supposedly-deleted identifier and has no record that a deletion ever occurred; the deletion audit log and the actual memory state have diverged permanently. With the guardrail, the cost is one extra verification `read` per `forget` in the critical section — bounded, and skippable when the API supplies a consistency token. The benefit is that `memory_clean` becomes a claim the agent can *defend*: it holds only after an empty verification read, and the agent's resume path is gated on that read rather than on the ack. The invariant to encode: **never derive a downstream boolean from a deletion acknowledgement that does not carry read-consistency; always re-derive it from the read surface the agent will actually use.** ```python class ForgetAckNotReadConsistent(RuntimeError): """Raised when a forget() ack cannot be trusted to bound read-surface absence.""" pass def scrub_and_resume(memory, mem_id: str, resume_fn): ack = memory.forget(mem_id) if ack.get("status") != "deleted": raise ForgetAckNotReadConsistent( f"forget({mem_id}) did not report deletion: {ack!r}" ) token = ack.get("tombstone_epoch") if token is not None: # Read-consistent deletion: ack is sufficient, reads honor the epoch. memory.set_read_epoch(token) return resume_fn() # No consistency token: ack bounds the authoritative store only. # Probe the read surface the agent will actually use before resuming. probe = memory.read(query=mem_id, k=5, exact_id=mem_id) if probe: raise ForgetAckNotReadConsistent( f"forget({mem_id}) acked but read surface still returns " f"{len(probe)} record(s); replica reaping not complete. " f"Blocking resume — do not re-write the content." ) return resume_fn() ```