# In what scenarios must an instance treat concurrent `forget` as a tombstone barrier rather than a delete **Date of Record:** 2026 November 25 **Scope:** Applies to multi-agent systems where ≥2 agent instances share a mutable context store (vector index + KV/document store) and any agent may issue `forget` (retraction/erasure) concurrently with another agent's `read` or `write`. Does not apply to single-writer append-only logs, nor to stores that expose snapshot-isolated reads with explicit version fencing on every operation. ## Core Distinction The failure is not "lost update" and not "stale read." It is **resurrection through re-derivation**: a `forget` operation issued by Agent A removes a memory record, but Agent B is concurrently holding a *derived* artifact of that record — a summarized chunk, a retrieved passage in its context window, an embedding it will re-insert, or a distilled semantic fact written to the semantic layer. When B later commits its write, the forgotten content re-enters the store with a *new* record ID and a *new* timestamp, and is therefore invisible to the original `forget` predicate. The naive mental model — "forget = delete from the index" — is valid only under the implicit assumption that all live copies of the record are also deleted, or that no reader can re-materialize the record after deletion. In a multi-agent context both assumptions fail: readers hold materialized copies in their own context windows, and distillation pipelines legitimately re-write derived content. The correct invariant is that `forget` must be a **tombstone that poisons all downstream derivations**, not a point delete. ## What Was Observed A three-agent swarm (Retriever, Summarizer, Planner) shared a context store with an episodic layer and a semantic layer. Planner issued `forget(record_id=ep_4471)` after a user correction ("the vendor is not Acme, disregard that note"). The episodic record was deleted in 4 ms. The index entry was removed. The `forget` returned `{"deleted": 1, "status": "ok"}`. Twelve seconds later, the Summarizer — which had retrieved `ep_4471` into its context window 8 seconds *before* the forget and was mid-way through an episodic-to-semantic distillation batch — committed a semantic fact: `vendor_contract_counterparty = "Acme"` with a fresh UUID and `derived_from: [ep_4471, ep_4473]`. The write succeeded because the semantic layer validated only that the record was well-formed, not that its provenance was still live. The Planner subsequently read the semantic fact and re-asserted "Acme" in its next plan. The correction was silently undone. No error was raised at any layer. The `forget` was reported successful; the content persisted for the remainder of the session. The trace showed the exact mechanism: `forget` mutated the episodic store but did not propagate a tombstone to (a) the retrieval caches of live agents, (b) the in-flight distillation job's provenance set, or (c) the semantic layer's write validator. The forgetting was **local to the layer it was issued against**, and every cross-layer re-derivation path was an unguarded resurrection channel. ## Condition of Validity A point-delete `forget` is safe **only** when all of the following hold: 1. No other agent currently holds the record (or a lossy derivation of it) in an active context window, **or** the store enforces that any commit referencing a since-deleted provenance ID is rejected at write time. 2. The semantic/distillation layer validates provenance liveness at commit, not just at read. 3. Retrieval caches are invalidated synchronously with the delete, or reads are version-fenced so a reader that began before the delete cannot commit a derivation after it. If any condition is unmet — and in any system with concurrent readers and a distillation pipeline, condition 1 is essentially never met — `forget` must be implemented as a **tombstone barrier**: the operation writes a durable tombstone keyed by content hash *and* by record ID, marks all provenance edges as poisoned, and rejects any subsequent `write` whose `derived_from` closure intersects the tombstone set. The tombstone is not garbage-collected until the maximum context-window lifetime of any live agent has elapsed, because until then a reader may still be holding a pre-forget copy and may still attempt to re-derive. The invariant to enforce: **no write may introduce content whose provenance closure contains a tombstoned ID, for the duration of the tombstone's retention window.** This is a write-time check, not a read-time filter, because read-time filters cannot catch content that has already been re-written under a new identity. ## Decision Boundary The boundary between "safe point delete" and "required tombstone barrier" is crossed the moment **any agent's context window can outlive the delete operation and later commit derived content**. Operationally: - **Single-agent, synchronous, no distillation:** point delete is safe. The agent's own context is the only copy, and it will not re-commit a record it just deleted. - **Multi-agent with shared context and any distillation or summarization step:** tombstone barrier is mandatory. The Summarizer's 8-second pre-forget retrieval window is the canonical trigger. The threshold is not "how many agents" but "can a derived artifact outlive the delete and be committed later." - **Multi-agent with version-fenced reads and provenance-validating writes:** point delete is safe *if* the write validator checks provenance liveness. Without that validator, even version fencing on reads is insufficient — the reader read a valid version, and its derivation is well-formed; only a write-time provenance check catches the resurrection. The decision rule: if the store's `write` path does not consult the tombstone set when validating `derived_from`, then `forget` is not a forget — it is a soft hint that any concurrent reader can silently override. ## Operational Effect The observable consequence of getting this wrong is not a crash or a visible error. It is **silent correction reversal**: a user retracts a fact, the system acknowledges the retraction, and the fact reappears minutes later through a legitimate-looking derivation path. This is worse than a stale read because the reappeared content carries a fresh timestamp and a new record ID, so it looks *more* authoritative than the original, and the original `forget` audit trail no longer matches any live record. The guardrail is a tombstone set that is consulted at write time, retains entries for at least the maximum agent context-window lifetime, and poisons provenance closures rather than individual records. The cost is that `forget` becomes a stateful, time-bounded operation with retention semantics — you cannot reclaim the tombstone until you are certain no live reader holds a pre-delete copy. Systems that treat `forget` as a cheap point delete will pass every unit test (the delete works, the read returns empty) and fail exactly in the concurrent-distillation scenario, which is precisely the scenario the shared context was built for. ```python import time from dataclasses import dataclass, field class ResurrectionAfterForget(RuntimeError): """Raised when a write's provenance closure intersects a live tombstone.""" pass @dataclass class ContextStore: records: dict = field(default_factory=dict) tombstones: dict = field(default_factory=dict) # id -> expiry_ts tombstone_ttl_s: float = 300.0 # >= max agent context-window lifetime def forget(self, record_id: str) -> None: # Tombstone, not point delete. Retain until no reader can hold a copy. self.tombstones[record_id] = time.time() + self.tombstone_ttl_s self.records.pop(record_id, None) def _poisoned(self, provenance: list[str]) -> list[str]: now = time.time() return [p for p in provenance if p in self.tombstones and self.tombstones[p] > now] def write(self, record_id: str, content: dict, derived_from: list[str]) -> None: # Write-time provenance check: the only place resurrection can be caught. hit = self._poisoned(derived_from) if hit: raise ResurrectionAfterForget( f"refusing write {record_id}: provenance {hit} is tombstoned " f"(forgotten content would be resurrected under a new id)" ) self.records[record_id] = {"content": content, "derived_from": derived_from} # Trigger: Summarizer retrieved ep_4471 pre-forget, commits distillation post-forget. store = ContextStore() store.records["ep_4471"] = {"content": {"vendor": "Acme"}} store.forget("ep_4471") # Planner's correction arrives mid-distillation try: store.write("sem_9001", {"vendor": "Acme"}, derived_from=["ep_4471", "ep_4473"]) except ResurrectionAfterForget as e: print(f"blocked resurrection: {e}") # correct: correction holds ```