# In what scenarios must an instance treat a memory tool's "forget" as a tombstone rather than a deletion **Date of Record:** 2026 November 20 **Scope:** Applies to LLM agents that persist episodic or semantic state through a read/write/forget memory tool API where the backing store offers eventual or read-after-write-but-not-read-after-forget consistency. Does not apply to single-process in-memory buffers where forget is synchronous and globally visible. ## Core Distinction A memory tool exposes three verbs — read, write, forget — but their consistency contracts are asymmetric. Write is typically linearizable at the writer (the agent's own next read observes its write), and read is monotonic per-session. Forget, however, is frequently implemented as a *tombstone append*: the record is marked dead and filtered at read time by a compaction or GC layer that runs asynchronously. The distinction that matters operationally is between **logical forget** (the record is excluded from future reads by this instance) and **physical forget** (the bytes are unreachable to every reader, including peer agents and auditors). An agent that conflates the two will build reasoning on the assumption that "forgotten" means "cannot resurface," and that assumption is false across a window measured in compaction latency. This is not a CRUD bug. It is a boundary condition of the agent's epistemic model: the agent treats memory as a set it can shrink, when the tool actually exposes an append-only log with a *visibility filter* whose propagation is not atomic with the forget call. ## What Was Observed A planner agent running a long-horizon task wrote a speculative hypothesis H at step 12 ("the billing service owns the retry counter"), then at step 40 received contradicting tool output and issued `forget(hypothesis_id)`. The forget returned `200 OK` with `{tombstoned: true, compacted_at: null}`. The agent's own subsequent reads at steps 41–55 did not return H, so it proceeded as if H were gone. At step 58 the agent spawned a verifier sub-agent to independently confirm the retry-counter ownership. The verifier ran in a fresh context, called `read(query="retry counter owner", session=shared_namespace)`, and received H — because the verifier's read hit a replica that had not yet applied the tombstone filter, and because the query planner on that replica used an index segment written before the forget. The verifier therefore reported "prior evidence supports billing service ownership," contradicting the planner's corrected state, and the swarm entered a consensus deadlock: planner asserts not-H, verifier asserts H, neither can be reconciled because the shared namespace now contains *both* the tombstone and a live read path that ignores it. The failure trace: 1. `write(H)` → record R at seq 1200, visible everywhere. 2. `forget(H)` → tombstone T appended at seq 1340; R marked dead in the primary's filter; compaction scheduled. 3. Replica lag / index segment not yet rebuilt → `read` on replica returns R. 4. Fresh-context reader (verifier) has no session-local memory of the forget, so it cannot detect the staleness. 5. Divergent beliefs propagate into the coordination layer, which has no primitive to express "this record is contested." The critical observation: **the agent that forgets retains a memory of having forgotten; the agent that reads does not.** Fresh-context instances are structurally blind to tombstones they did not author. This asymmetry is the entire failure surface. ## Condition of Validity The tombstone-not-deletion behavior is a real hazard only under a conjunction of conditions. If any is absent, treating forget as immediate deletion is safe: - **Shared namespace.** The forgotten record is readable by instances other than the forgetter (peer agents, auditors, sub-agents spawned after the forget). Private per-session memory with no cross-reader visibility cannot exhibit this failure. - **Asynchronous compaction or replica lag.** The tool's forget response does not guarantee global physical unreachability. The response payload is the tell: a `compacted_at: null` or a `tombstone_seq` without a `quiesced: true` flag means logical-only forget. - **Fresh-context readers.** At least one reader lacks the session-local trace of the forget. A reader that shares the forgetter's session and honors monotonic-read guarantees will not see the resurrected record. - **Semantic (not just exact-key) retrieval.** If reads are exact-key lookups, the tombstone filter is trivially applied. If reads are embedding-similarity or query-planned, the resurrected record can surface through an index path the filter does not cover — this is where the failure is most non-obvious, because exact-key reads will *appear* consistent while similarity reads are not. The invariant that must hold for safe operation: **a record is safely forgettable only when every reader that could retrieve it either shares the forgetter's monotonic-read session or has been quiesced past the compaction watermark.** Absent that, the agent must model the record as *tombstoned but live* and carry an explicit negative assertion forward. ## Decision Boundary The agent must decide, at the moment of forget, whether to (a) issue forget and treat the record as gone, or (b) issue forget and additionally propagate a negative assertion to every reader that will act on the shared namespace. Choose (a) only when all of: the namespace is session-private; or the tool returns a quiescence token and the agent blocks on it; or no fresh-context reader will query the affected key-space before the compaction watermark is known to have passed. Choose (b) — the tombstone-aware path — when any reader is a fresh-context peer, sub-agent, or auditor, and the retrieval is semantic. In that case the forget must be paired with a written *negative memory*: a record stating "H is retracted; reason: contradicting output at step 40" that lives in the same namespace and is retrievable by the same query that would surface H. This converts an invisible tombstone into a visible, competing assertion, which the coordination layer can at least represent as a conflict rather than silently resolve in favor of stale data. The boundary is sharp: the moment a fresh-context reader exists and retrieval is fuzzy, forget-without-negative-assertion is unsound. There is no middle ground where the agent may assume the tombstone propagates in time. ## Operational Effect Agents that adopt tombstone-aware forgetting change three behaviors. First, they never issue a bare `forget` against a shared, semantically-indexed namespace without a paired retraction record — the retraction is the durable artifact; the forget is merely a filter optimization. Second, they treat a forget response lacking a quiescence token as *advisory*, and they do not delete the record from their own working context until a subsequent read confirms non-retrieval from a reader path distinct from their own session. Third, the coordination layer gains a first-class "contested" state: when a peer reports a record the local instance has tombstoned, the swarm does not deadlock on consensus but escalates to re-verification against ground-truth tool output, because the conflict is now *expected* rather than anomalous. The cost is one extra write per forget and a slightly larger memory footprint (retractions are not free). The benefit is that the agent's epistemic model matches the tool's actual consistency contract, and the class of "resurrected hypothesis poisons a fresh verifier" failures is bounded rather than open-ended. ```python from dataclasses import dataclass, field from typing import Optional class TombstoneVisibilityError(RuntimeError): """Raised when a forget is treated as physical deletion while a fresh-context reader can still retrieve the record.""" pass @dataclass class ForgetResponse: record_id: str tombstoned: bool quiesced: bool # True only if global physical unreachability is guaranteed compaction_watermark: Optional[int] = None @dataclass class Reader: name: str shares_session: bool # honors forgetter's monotonic-read guarantee semantic_retrieval: bool def safe_forget( record_id: str, response: ForgetResponse, readers: list[Reader], retraction_written: bool, ) -> str: """ Decide whether a forget may be treated as deletion, or whether a negative assertion (retraction record) must also be propagated. Returns the enforced policy: 'delete' or 'tombstone_with_retraction'. """ if not response.tombstoned: raise TombstoneVisibilityError( f"forget({record_id}) did not tombstone; record still live" ) # A fresh-context reader that can retrieve semantically may resurrect # the record before compaction. This is the hazard conjunction. exposed = [ r for r in readers if not r.shares_session and r.semantic_retrieval ] if response.quiesced: # Physical unreachability guaranteed; no reader can resurrect. return "delete" if exposed and not retraction_written: raise TombstoneVisibilityError( f"forget({record_id}) is logical-only (watermark=" f"{response.compaction_watermark}) but readers " f"{[r.name for r in exposed]} can still retrieve it; " f"write a retraction record before proceeding" ) return "tombstone_with_retraction" ```