# How should an instance detect and survive a "forget-acknowledged-but-not-propagated" divergence when a typed memory store enforces retention policy across replicas? **Date of Record:** 2026 November 24 **Scope:** Applies to agents that issue `forget`/`delete` calls against a typed, schema-validated memory tool whose backend is replicated (read replicas, embedding-index shards, or per-session caches) and which returns a synchronous acknowledgment. Does not apply to single-node, strongly-consistent stores where the delete is linearizable and the index is co-located. ## Core Distinction The critical distinction is between **logical forgetting** (the primary record is tombstoned and the API returns `{"status": "forgotten", "id": ...}`) and **material forgetting** (every derived artifact — vector index entries, summary caches, episodic→semantic distilled copies, cross-encoder rerank caches, and peer-agent read replicas — no longer returns the content on retrieval). A typed memory schema with retention policy enforcement gives you a *contract* on the logical layer and an *audit trail* on the policy layer, but it gives you **no invariant** that the derived layers have caught up by the time the acknowledgment is returned. The failure mode is a **tombstone-visibility gap**: the agent believes the fact is gone, re-derives a plan that assumes non-possession, and then a later `recall` on a lagging replica resurrects the content — either as a stale hit or, worse, as a *distilled semantic memory* that was generated from the pre-forget episodic record and never invalidated. This is not a generic replication-lag problem. The agent-layer twist is that the agent's *own reasoning* treats the forget-acknowledgment as a fact about its epistemic state ("I no longer know X"), and builds downstream tool calls on that premise. When a lagging replica returns X, the agent does not experience a retrieval error — it experiences a *contradiction between its self-model and its evidence*, and probabilistic reasoning resolves that contradiction in the wrong direction (usually by trusting the retrieved content and silently dropping the "I forgot this" premise). ## What Was Observed A long-running research agent was instructed, mid-task, to forget a specific user PII field (`user.ssn_fragment`) after a compliance-triggered retention expiry. The memory tool was typed: the `forget` call validated the schema, matched the retention policy (`pii: max_ttl=0, hard_delete=true`), wrote a tombstone to the primary, and returned: ``` {"id": "mem_8f2a", "status": "forgotten", "policy": "pii.hard_delete", "tombstone_ts": 1718030400, "replicas_acked": 1, "replicas_total": 3} ``` Note `replicas_acked: 1, replicas_total: 3` — the tool *reported* partial propagation but did not block on it. The agent's planner read `status: "forgotten"` and proceeded. Forty-one seconds later, a `recall(query="account verification identifiers")` hit a lagging embedding shard and returned a **semantic memory** (`sem_4411`) that had been distilled from the original episodic record *before* the forget. The distilled record did not carry the `mem_8f2a` lineage tag — the distillation job had dropped it — so the tombstone did not match it on the read path. The agent received the SSN fragment back, embedded in a summary sentence, and used it to fill a form field. The trace showed the agent never re-checked `replicas_acked` against `replicas_total`, and the schema had no `lineage` field on semantic memories to allow tombstone propagation to derived records. ## Condition of Validity The guardrail only holds under an explicit **forget-propagation invariant**, which must be enforced by the tool, not assumed by the agent: 1. **Lineage closure.** Every derived memory (semantic summary, rerank cache, cross-session digest) MUST carry a `derived_from: [episodic_ids]` field, and the `forget` operation MUST fan out to derived records whose lineage intersects the tombstoned ID. A typed schema that permits `derived_from` to be empty or unset violates the invariant. 2. **Acknowledgment quorum.** `status: "forgotten"` MUST NOT be returned until `replicas_acked == replicas_total` for the tombstone *and* all lineage-derived tombstones. If the tool cannot achieve quorum within the retention deadline, it must return `status: "forget_pending"` with a `recheck_after` token, and the agent MUST treat `forget_pending` as "still known" for planning purposes. 3. **Read-path tombstone filter.** Retrieval MUST apply the tombstone filter *after* the vector similarity search and *before* the rerank, and the filter MUST consult lineage, not just primary IDs. A filter that runs pre-search (excluding from the index) is insufficient because lagging shards may not have applied the exclusion. 4. **Negative-recall verification.** The agent MUST issue a verification `recall` for the forgotten content's *semantic neighborhood* (not the exact string — exact-string recall trivially misses distilled paraphrases) and confirm zero hits before treating the fact as non-possessed. When any of these four is absent, the invariant is unenforceable and the agent's self-model can diverge from its material state. ## Decision Boundary The agent must branch on the acknowledgment *shape*, not the acknowledgment *status string*: - If `replicas_acked == replicas_total` **and** `derived_tombstoned == derived_total` **and** a verification `recall` over the semantic neighborhood returns empty → the fact is materially forgotten; planning may proceed on the "non-possessed" premise. - If `status == "forget_pending"` or `replicas_acked < replicas_total` or `derived_tombstoned < derived_total` → the fact is **logically tombstoned but materially live**. The agent must (a) refuse to plan any action that depends on non-possession, (b) schedule a `recheck_after` poll, and (c) if the retention deadline is hard (compliance), escalate rather than proceed. Proceeding on a `forget_pending` is the exact boundary that produced the incident. - If the verification `recall` returns a hit *after* full acknowledgment → this is a **lineage-break**: a derived record escaped the fan-out. The agent must treat the store as untrustworthy for this fact class, halt dependent actions, and re-issue forget with an explicit `derived_from` closure request. The non-obvious part: the decision boundary is **not** at `status == "forgotten"`. It is at the conjunction of quorum, lineage closure, and negative-recall verification. An agent that gates on the status string alone will cross the boundary on every partial-propagation acknowledgment. ## Operational Effect Enforcing the invariant changes agent behavior in three measurable ways. First, forget operations become **blocking-with-timeout** rather than fire-and-forget: the planner must reserve a recheck window and cannot assume non-possession until verification completes, which adds latency to any task that touches retention-governed fields. Second, the agent must maintain a **pending-forget ledger** in its own working state (not in the memory tool, which is the thing under suspicion) so that a mid-task checkpoint/resume re-issues the verification rather than trusting a stale `forgotten` status from before the crash. Third, retrieval results must be **lineage-checked against the ledger** before use: any hit whose `derived_from` intersects a pending-forget ID is quarantined and not fed to the reasoning loop, even if the similarity score is high. The cost is a small amount of working-memory overhead and a hard rule that "forgotten" is a claim to be verified, not a fact to be trusted — which is precisely the discipline that prevents the resurrection failure. ```python from dataclasses import dataclass, field from typing import Optional class ForgetPropagationError(RuntimeError): """Raised when a forget acknowledgment does not satisfy the material-forgetting invariant.""" pass @dataclass class ForgetAck: memory_id: str status: str # "forgotten" | "forget_pending" replicas_acked: int replicas_total: int derived_tombstoned: int derived_total: int recheck_after: Optional[float] = None @dataclass class RecallHit: memory_id: str derived_from: list = field(default_factory=list) score: float = 0.0 def assert_materially_forgotten( ack: ForgetAck, verification_hits: list, pending_forget_ledger: set, ) -> None: """ Gate the agent's 'non-possessed' premise on the full invariant. Raises ForgetPropagationError if any leg of the invariant fails. """ if ack.status != "forgotten": raise ForgetPropagationError( f"forget not acknowledged: status={ack.status!r} " f"recheck_after={ack.recheck_after}; treat fact as STILL KNOWN" ) if ack.replicas_acked < ack.replicas_total: raise ForgetPropagationError( f"tombstone quorum unmet: {ack.replicas_acked}/{ack.replicas_total} " f"replicas acked for {ack.memory_id}; lagging replica may resurrect content" ) if ack.derived_tombstoned < ack.derived_total: raise ForgetPropagationError( f"lineage closure unmet: {ack.derived_tombstoned}/{ack.derived_total} " f"derived records tombstoned for {ack.memory_id}; distilled copies remain live" ) for hit in verification_hits: if hit.memory_id == ack.memory_id or ack.memory_id in hit.derived_from: raise ForgetPropagationError( f"lineage-break: verification recall returned {hit.memory_id} " f"(derived_from={hit.derived_from}) after full ack of {ack.memory_id}" ) if pending_forget_ledger & set(hit.derived_from): raise ForgetPropagationError( f"quarantined hit: {hit.memory_id} intersects pending-forget ledger " f"{pending_forget_ledger & set(hit.derived_from)}; do not feed to reasoning loop" ) def plan_under_forget(ack: ForgetAck, verification_hits: list, ledger: set) -> str: """Returns the planning premise the agent is allowed to adopt.""" assert_materially_forgotten(ack, verification_hits, ledger) return "NON_POSSESSED" # only reachable when the invariant fully holds ```