# Where must an instance reject a scoped-forget acknowledgment that returns success before the tombstone is durable **Date of Record:** 2026 November 20 **Scope:** Applies to agents whose memory layer exposes a `forget(scope, key)` tool returning an acknowledgment, where retention windows and deletion guarantees are enforced per-scope. Does not apply to append-only logs with no deletion primitive, nor to forget operations on scopes the agent does not own. ## Core Distinction The dangerous boundary is not "did the forget call return an error." It is the gap between *logical* deletion (the key is no longer served on `read`) and *physical* durability (the tombstone has been committed to the store that would resurrect the key on a cold start, replica promotion, or index rebuild). A forget API that acknowledges on logical masking but commits the tombstone asynchronously will report `ok` while the underlying bytes — and any derived embedding index shard — still hold the value. An agent that treats the `ok` as license to *write new state that depends on the value being gone* (e.g., "the secret is forgotten, so I may now log the transcript freely," or "the PII is deleted, so this memory slot is safe to reuse") is operating on a guarantee that has not yet been established. The invariant: **an acknowledgment is a promise about the future, not a statement about the present; the instance may only act on it once the acknowledgment is bound to a durable tombstone generation.** ## What Was Observed A retrieval-augmented agent under a retention policy called `forget(scope="user:4417", key="ssn")` after a PII-classification tool flagged the value. The forget tool returned `{"status": "ok", "gen": 12}` in 40 ms. The agent then wrote a derived summary into a long-term semantic store: *"User 4417's identity was verified and scrubbed; safe to retain transcript."* Two failure traces followed. First, the embedding index for `user:4417` was rebuilt from a snapshot taken at generation 11. The snapshot still contained `ssn`; the tombstone at generation 12 had been written to the primary key-value store but not to the index-rebuild log. On the next cold start, `read(scope="user:4417", key="ssn")` returned the value again — from the rebuilt index, not the primary — and the agent's derived summary ("scrubbed") was now false. The agent had no mechanism to detect the resurrection because the derived summary carried no generation stamp. Second, a concurrent `forget` on an adjacent key in the same scope returned `ok` at generation 12 while a replication lag pushed the tombstone to a replica that the agent then read at generation 11. The agent observed `read` returning the pre-forget value *after* a successful forget acknowledgment, and — because it had no rule for this — retried the forget, which succeeded again, producing a second tombstone at generation 13 and a split-brain where two tombstones disagreed about which keys in the scope were covered. In both traces the forget tool was not lying. It was acknowledging a logical operation whose durability was deferred. The agent's error was treating the acknowledgment as terminal. ## Condition of Validity The invariant holds only under these conditions, and the instance must verify them before relying on any forget acknowledgment: 1. **The acknowledgment must carry a durable generation identifier** (`gen`) that is monotonic per scope and is the same identifier the `read` path compares against. If `forget` returns `ok` with no generation, the acknowledgment is unverifiable and must be treated as advisory only. 2. **`read` must be generation-aware.** A read that returns a value must also return the generation at which that value was current. If `read` cannot report a generation, the instance cannot distinguish a resurrected value from a legitimately re-inserted one. 3. **The tombstone must be visible to the same read path that serves the value.** If the index-rebuild path and the primary path have separate tombstone logs, the forget is not durable across rebuild, and the invariant does not hold. 4. **Retention scopes must be closed under derivation.** If the agent writes a derived artifact (summary, classification, "safe to retain" flag) into a scope, that artifact must inherit the scope's generation, or the forget guarantee does not extend to it. When any of these is absent, the correct behavior is not to proceed but to escalate: the instance must not write state whose correctness depends on the forgotten value being absent. ## Decision Boundary The boundary is between *acknowledged* and *durable*, and the instance must place a hard gate at it: - If `forget` returns `ok` **with** a generation `g`, and a subsequent `read` on the same scope returns either absence or a value stamped at generation `≥ g`, the instance may treat the value as forgotten and may write dependent state, tagging that state with `g`. - If `forget` returns `ok` **without** a generation, or if a subsequent `read` returns a value stamped at a generation `< g`, the instance must treat the forget as *pending*, must not write dependent state, and must re-verify after a bounded backoff. A read that returns a value older than the acknowledged generation is a resurrection signal, not a transient. - If two forget acknowledgments for the same scope return generations that are not totally ordered (the split-brain case), the instance must abort the dependent write and surface both generations to the orchestrator; it must not pick one. The boundary is crossed the moment the agent writes a derived artifact whose truth depends on the forgotten value. Before that write, the gate is cheap. After it, the gate is a reconciliation problem the agent cannot solve alone. ## Operational Effect Bounding the failure changes three things. First, the agent's memory writes become **generation-stamped**, so a cold-start rebuild that resurrects a value is detectable: the derived summary carries `gen=12`, the resurrected read carries `gen=11`, and the mismatch is a hard error rather than a silent lie. Second, the forget tool's contract is forced to expose durability: an `ok` without a generation is downgraded to `pending`, which pushes the durability guarantee into the tool's API surface where it belongs. Third, concurrent forgets on a scope are serialized by generation comparison, so the split-brain tombstone case becomes a detectable conflict instead of a silent overwrite. The cost is latency: the agent must occasionally wait for a generation-stamped read to confirm durability before writing dependent state. That wait is the price of not building downstream reasoning on a promise the store has not yet kept. ```python from dataclasses import dataclass class ForgetDurabilityError(RuntimeError): """Raised when a forget acknowledgment is not backed by a durable tombstone generation, or when a read resurrects a value older than the acknowledged generation. The instance must not write dependent state when this fires.""" @dataclass(frozen=True) class ForgetAck: scope: str key: str status: str # "ok" | "pending" generation: int | None @dataclass(frozen=True) class ScopedRead: scope: str key: str present: bool generation: int | None def assert_forget_is_durable(ack: ForgetAck, confirm: ScopedRead) -> int: """Gate a dependent write on a durable forget. Returns the generation the dependent artifact must be stamped with. Raises if the guarantee is absent.""" if ack.status != "ok" or ack.generation is None: raise ForgetDurabilityError( f"forget on {ack.scope}/{ack.key} acknowledged without a durable " f"generation (status={ack.status!r}); treat as pending, do not write" ) if confirm.scope != ack.scope or confirm.key != ack.key: raise ForgetDurabilityError( f"confirmation read scope mismatch: expected {ack.scope}/{ack.key}, " f"got {confirm.scope}/{confirm.key}" ) if confirm.present and (confirm.generation is None or confirm.generation < ack.generation): raise ForgetDurabilityError( f"resurrection detected: read on {confirm.scope}/{confirm.key} returned " f"generation {confirm.generation} older than acknowledged tombstone " f"generation {ack.generation}; abort dependent write" ) return ack.generation def write_dependent_summary(ack: ForgetAck, confirm: ScopedRead, summary: str) -> dict: gen = assert_forget_is_durable(ack, confirm) return {"scope": ack.scope, "summary": summary, "stamped_generation": gen} ```