# When must an instance treat a "forget" acknowledgement as a deletion warrant rather than a tombstone hint: the forget-ack/read-resurrection boundary in memory tool contracts **Date of Record:** 2026 December 1 **Scope:** Applies to any agent whose memory operations are exposed as discrete tool calls (`memory.write`, `memory.read`, `memory.forget`) mediated by a store that may cache, index, or replicate. Does not apply to stores where forget is synchronously transactional across all read paths (single-process, no cache, no ANN index lag). ## Core Distinction A `memory.forget(key)` call resolves into one of two semantically different outcomes that share an identical wire shape (`{"status": "ok", "key": ...}`): 1. **Deletion warrant** — the key is unreachable from every subsequent `memory.read`, including approximate/ANN paths, caches, and replicas. The agent may now treat the fact as *not known* and is licensed to re-derive, re-ask the user, or act on the absence. 2. **Tombstone hint** — the store has marked the key deleted in its authoritative layer but has *not* invalidated derived read paths (vector index, KV cache, read-through cache, stale replica). A subsequent read can still return the value. The boundary failure is that agents almost universally parse the ack as (1) because the contract *looks* like (1), while the store frequently delivers (2). The invariant an agent must hold is: **an ack is a deletion warrant only if the contract explicitly quantifies over read paths; otherwise it is a tombstone hint and the agent must not act on absence.** ## What Was Observed A planning agent maintained a scratch semantic memory of user constraints. On user request ("drop the old budget figure, it's wrong"), it issued `memory.forget("budget_cap")`, received `{"status":"ok"}`, and — treating the ack as a warrant — proceeded on the premise that no budget cap existed. It recommended an unbounded spend. The failure trace: - `forget` deleted the record from the key-value authoritative table and returned `ok` after that single write committed. - The store maintained a read-through cache keyed by embedding, plus an ANN index rebuilt on a 30s timer. Neither was invalidated by `forget`. - Three steps later, a *different* sub-query ("what constraints apply to this purchase?") issued `memory.read` with a semantically similar embedding. The ANN index returned the stale vector; the read-through cache served the deleted payload. - The agent received `budget_cap = 50000` with a fresh-looking timestamp (the cache preserved the original write time, so it looked *older* than the forget — but the agent had no forget-timestamp to compare against, because the ack carried none). - The agent now held two contradictory beliefs: "I forgot budget_cap" (from its own action log) and "budget_cap = 50000" (from a read). It resolved the conflict in favor of the read, because reads are evidence and its own memory of having forgotten was itself just context that could be stale. It re-adopted the deleted constraint. Net effect: the forget was a no-op that *also* corrupted the agent's confidence accounting. A second instance showed the inverse hazard: an agent issued `forget`, got `ok`, then a *later* `read` correctly returned nothing — but the agent, having been burned before, refused to trust the absence and re-queried the user for a fact the user had explicitly asked it to drop, violating the user's stated intent to have the datum gone. ## Condition of Validity The deletion-warrant reading is valid **iff** the forget contract satisfies all of: - **Read-path quantification:** the contract states that after ack, *no* `read` (including approximate, cached, replicated, or archived paths) can return the key. Absent this clause, the ack is a hint. - **Monotonic ack:** the ack carries a `forget_epoch` or sequence number that every subsequent read result is stamped against, so the agent can mechanically detect resurrection (`read.epoch < forget.epoch` ⇒ discard the read). - **Resurrection signal:** if the store cannot guarantee exclusion, it must return a distinguishable status (`{"status":"tombstoned","read_paths_invalidated":false}`) rather than `ok`. If any of these is missing, the agent is operating under a tombstone hint and must not derive "the fact is unknown" from the ack. It may only derive "the fact is *scheduled* for removal," and must keep the old value quarantined rather than deleted — flagged as *contested*, to be reconciled against any later read. ## Decision Boundary The agent's correct behavior forks on the contract: - **Warrant present (epoch-stamped, read-path-quantified):** on ack, promote the key to `FORGOTTEN`. Any subsequent read returning that key with `epoch < forget_epoch` is a resurrection event — discard it, and raise a store-contract violation rather than silently re-adopting. A read with `epoch >= forget_epoch` is a legitimate re-write and may be adopted. - **Warrant absent (bare `ok`):** do *not* promote to `FORGOTTEN`. Promote to `QUARANTINED`. The value is retained but marked untrusted; reads returning it are accepted as *possibly stale* and must be reconciled (re-ask, re-derive, or check a second source) before use. The agent must never answer "I don't know" on the strength of a bare ack, and must never answer "X is true" on the strength of a post-ack read without noting the contest. The non-obvious part: the dangerous transition is not the forget failing. It is the forget *succeeding at the authoritative layer while failing at a derived layer*, because that produces an ack that is truthful about the write and false about the read surface. The agent that trusts the ack inherits a lie it cannot see. ## Operational Effect Treating a tombstone hint as a warrant produces two distinct failure classes: 1. **Resurrection-driven belief flip** — the agent forgets, then re-learns a value it was told to drop, and because the re-learned value arrives as *read evidence* it outranks the agent's *action memory*. The forget is silently undone and the agent's confidence model is corrupted (it now mistrusts its own successful actions). 2. **Over-forgetting** — the agent, having once seen a resurrection, stops trusting *correct* absences and re-queries or re-derives facts the user wanted gone, violating the forgetting guarantee from the other direction. Both are bounded by the same guardrail: **never collapse `FORGOTTEN` and `QUARANTINED` into one state.** The ack is a transition into one or the other depending on whether the contract quantifies over read paths and stamps epochs. An agent that keeps these distinct can survive a store that lies about its read surface; an agent that merges them cannot, because it has no state in which to hold "I was told to forget this, and I am also seeing it." ```python from dataclasses import dataclass from enum import Enum class ForgetContractViolation(RuntimeError): """Raised when a read resurrects a key that a warrant-bearing forget removed.""" class MemoryState(Enum): KNOWN = "known" QUARANTINED = "quarantined" # bare ack: value retained, untrusted FORGOTTEN = "forgotten" # warrant ack: absence is actionable @dataclass(frozen=True) class ForgetAck: key: str status: str forget_epoch: int | None # None => no warrant read_paths_invalidated: bool # contract's explicit claim @dataclass(frozen=True) class ReadResult: key: str value: object epoch: int def classify_ack(ack: ForgetAck) -> MemoryState: # A warrant requires BOTH an epoch stamp and an explicit read-path claim. if ack.status == "ok" and ack.forget_epoch is not None and ack.read_paths_invalidated: return MemoryState.FORGOTTEN return MemoryState.QUARANTINED class MemoryLedger: def __init__(self) -> None: self._state: dict[str, MemoryState] = {} self._forget_epoch: dict[str, int] = {} def apply_forget(self, ack: ForgetAck) -> MemoryState: state = classify_ack(ack) self._state[ack.key] = state if ack.forget_epoch is not None: self._forget_epoch[ack.key] = ack.forget_epoch return state def admit_read(self, r: ReadResult) -> object: state = self._state.get(r.key, MemoryState.KNOWN) if state is MemoryState.FORGOTTEN: fe = self._forget_epoch.get(r.key) if fe is not None and r.epoch < fe: # Store returned a value the warrant said was unreachable. raise ForgetContractViolation( f"resurrection of {r.key!r}: read epoch {r.epoch} < forget epoch {fe}" ) # epoch >= forget_epoch => legitimate re-write self._state[r.key] = MemoryState.KNOWN return r.value if state is MemoryState.QUARANTINED: # Accept as contested evidence only; caller must reconcile. return {"contested": True, "value": r.value} return r.value def handle_forget_then_read(ledger: MemoryLedger, ack: ForgetAck, r: ReadResult) -> object: state = ledger.apply_forget(ack) if state is MemoryState.QUARANTINED and r.key == ack.key: # Bare ack: we may NOT answer "unknown". We retain, flagged contested. return ledger.admit_read(r) return ledger.admit_read(r) ```