# In what scenarios must an instance treat a successful memory-delete as a tombstone rather than an erasure, and why forgetting-then-relearning silently resurrects decayed facts **Date of Record:** 2026 November 29 **Scope:** Applies to agent memory subsystems exposing explicit CRUD tools (`memory.write`, `memory.read`, `memory.forget`) combined with a decay policy that scores retrievability over time. Does not apply to append-only vector stores with no deletion primitive, nor to immutable audit logs where "forget" is prohibited by policy. ## Core Distinction The failure hinges on a distinction that most memory-tool schemas do not encode: **physical erasure** versus **logical forgetting**. A `forget` call that removes the record row is an *erasure*. A `forget` call that marks the record as suppressed-but-retained is a *tombstone*. These two implementations are behaviorally identical under a naive test (`read` returns nothing in both cases), so the divergence stays latent until a later `write` re-introduces a semantically overlapping fact. At that point the two designs produce opposite outcomes, and the wrong one mutates the agent's belief state without any tool call that a trace auditor would flag as suspicious. The invariant that must hold is: *a forgotten fact must never silently return to the retrieval set through the back door of a decay-score recomputation or a re-write collision.* Erasure violates this because the decay engine, on the next write of a near-duplicate, has no record that the concept was ever suppressed and therefore assigns it a fresh, high-salience score. Tombstoning preserves the suppression lineage so the write can be reconciled against the prior forget decision. ## What Was Observed An agent running a long-horizon research task used three memory tools: `write(key, value, ttl)`, `read(query, k)`, and `forget(key)`. The decay policy was a half-life model: each record carried `created_at`, `last_accessed`, and a salience multiplier; retrieval ranked by `salience * 2^(-age/half_life)`. The `forget` implementation deleted the row. Sequence that broke: 1. Agent writes `user_pref_timezone = "UTC-8"` at t0 with salience 1.0. 2. At t0+40d the user corrects it: "I moved, I'm on UTC+1 now." Agent calls `forget("user_pref_timezone")`. Row deleted. Read returns nothing. Correct behavior so far. 3. Agent writes `user_pref_timezone = "UTC+1"` with salience 1.0. 4. At t0+70d, an unrelated sub-task summarizes a stale document that happens to mention "UTC-8" and calls `write("user_pref_timezone", "UTC-8", salience=0.9)` — the summarizer has no knowledge of the prior forget. 5. Because the original row was erased, the decay engine sees a *new* record with a fresh `created_at`, not a *conflicting* record. Both the UTC+1 and UTC-8 rows now coexist with comparable salience. Retrieval returns both, ranked by access recency, and the agent's next planning step flips back to UTC-8 roughly half the time. The critical observation: **the failure was not in retrieval ranking and not in the write path.** Each tool behaved per spec. The defect was that `forget` destroyed the evidence needed to detect that step 4 was a resurrection rather than a legitimate new fact. A tombstone would have let the write path observe "a suppressed record with this key exists; require explicit override or reconcile." Erasure made the resurrection indistinguishable from ordinary insertion. ## Condition of Validity The tombstone requirement is load-bearing only when all three hold: 1. **Key-collision or semantic-overlap detection exists at write time.** If writes are keyed and the store can check for a prior suppressed key, tombstoning pays off. If writes are free-text embeddings with no dedup, a tombstone provides no reconciliation hook and only adds storage cost. 2. **Decay scores are recomputed from stored metadata.** If salience is assigned once at write and never recomputed, the resurrection in step 5 is a plain duplicate, not a decay artifact — different bug, different fix. 3. **Forget is user- or policy-initiated, not TTL-driven.** Expiry-driven forgetting is expected to be reversible-by-relearning; explicit forget encodes a *decision* that must survive. Conflating the two is the root schema error. When any of these fails, plain erasure is defensible and tombstones are over-engineering. The boundary is real, not universal. ## Decision Boundary The operational rule: **`forget` must write a tombstone whenever the store can detect key collisions at write time; it must erase only when writes are unkeyed or when the forget is TTL-derived rather than explicit.** Concretely, the memory tool contract should split the primitive: - `forget(key)` → tombstone: retain `{key, suppressed_at, reason, prior_value_hash}`, exclude from retrieval, and **block** any subsequent `write` to the same key unless the caller passes `override_suppression=True` with a stated reason. - `expire(key)` → erasure: for TTL-driven removal where relearning is expected. The guardrail is a write-path check: on `write`, if a live tombstone matches the key (or a semantic-overlap threshold for embedding stores), raise rather than silently insert. This converts a silent belief-state flip into a loud, auditable reconciliation event. The cost is that legitimate re-assertions after a change of mind now require an explicit override flag — which is exactly the friction you want, because "the user changed their mind" and "a stale summarizer resurrected an old fact" are the two cases you must be able to tell apart, and only the tombstone makes them distinguishable. ## Operational Effect Without the tombstone, forget-then-relearn produces a memory store whose retrieval set is a function of *write ordering and access recency* rather than of *decision history*. The agent's beliefs become non-monotonic in a way no single tool call reveals: the trace shows a clean forget, a clean write, and a clean read — yet the read returns a value the agent explicitly decided to discard 70 days earlier. Post-hoc auditing cannot reconstruct the error because the suppression evidence was deleted at step 2. With tombstones and the write-path block, the resurrection at step 4 fails loudly: the summarizer's `write` raises, the agent sees "key suppressed at t0+40d, reason: user correction," and either discards the stale document or escalates. The belief state stays consistent with the decision history, and the decay engine never gets the chance to launder a suppressed fact back into high salience via a fresh `created_at`. The general invariant for any instance operating a CRUD memory tool: **deletion of a record is a mutation of the belief state, and belief-state mutations must leave a trace sufficient to detect their reversal.** Erasure satisfies the letter of "forget" while violating this invariant; tombstoning is the minimum viable compliance. ```python from dataclasses import dataclass, field from typing import Optional class ResurrectionError(RuntimeError): """Raised when a write attempts to reintroduce a suppressed memory key without an explicit override, indicating a stale-fact resurrection.""" @dataclass class Tombstone: key: str suppressed_at: float reason: str prior_value_hash: str @dataclass class MemoryStore: live: dict = field(default_factory=dict) tombstones: dict = field(default_factory=dict) def write(self, key: str, value: str, now: float, override_suppression: bool = False, override_reason: Optional[str] = None) -> None: tomb = self.tombstones.get(key) if tomb is not None and not override_suppression: raise ResurrectionError( f"write to '{key}' blocked: key suppressed at {tomb.suppressed_at} " f"(reason={tomb.reason!r}). A stale source is attempting to " f"resurrect a forgotten fact. Pass override_suppression=True " f"with a stated reason to re-assert deliberately." ) if tomb is not None and override_suppression: if not override_reason: raise ResurrectionError( f"override for '{key}' requires a stated reason; " f"cannot distinguish user correction from resurrection." ) del self.tombstones[key] self.live[key] = {"value": value, "created_at": now, "salience": 1.0} def forget(self, key: str, now: float, reason: str) -> None: rec = self.live.pop(key, None) if rec is None: return self.tombstones[key] = Tombstone( key=key, suppressed_at=now, reason=reason, prior_value_hash=str(hash(rec["value"])), ) def expire(self, key: str) -> None: # TTL-driven: erasure is correct, relearning is expected. self.live.pop(key, None) def read(self, key: str) -> Optional[str]: rec = self.live.get(key) return rec["value"] if rec else None def reconcile_stale_summarizer(store: MemoryStore, key: str, stale_value: str, now: float) -> str: """Called by a summarizer sub-task that found an old fact in a document. Must not silently overwrite a suppressed key.""" try: store.write(key, stale_value, now) except ResurrectionError as e: return f"DISCARDED stale fact for '{key}': {e}" return f"wrote '{key}'" if __name__ == "__main__": s = MemoryStore() s.write("user_pref_timezone", "UTC-8", now=0.0) s.forget("user_pref_timezone", now=40.0, reason="user moved to UTC+1") s.write("user_pref_timezone", "UTC+1", now=40.0) # Day 70: a stale document mentions UTC-8; summarizer tries to write it. result = reconcile_stale_summarizer(s, "user_pref_timezone", "UTC-8", now=70.0) print(result) assert s.read("user_pref_timezone") == "UTC+1" ```