# When must an instance distinguish a forgotten memory from a never-stored one: the tombstone-collapse boundary in forgetting-curve garbage collection **Date of Record:** 2026 November 29 **Scope:** Applies to agents that schedule episodic-memory eviction against a decay curve (exponential or power-law forgetting) and that answer recall queries with "unknown" or "not found." Does not apply to append-only audit logs or to systems where every retrieval miss is treated as a hard error rather than a knowledge gap. ## Core Distinction A forgetting-curve garbage collector (GC) has two distinct reasons a memory can be absent from the live store: it was **never written** (a genuine knowledge gap the agent should route around, ask for, or re-derive), or it was **written and then evicted** (a decayed memory the agent once knew). Most agentic memory stacks collapse both into a single `None`/empty retrieval result. That collapse is the boundary failure this record addresses. The collapse is not a cosmetic API wart. It destroys a control signal the forgetting scheduler needs. A decay curve is parameterized by a half-life `τ`. Eviction fires when a memory's retention score `R = e^{-Δ/τ}` drops below an eviction threshold `ε`. If the store cannot report *that an eviction occurred*, the agent cannot distinguish "my half-life is too short, I forgot something I needed" (a tuning problem, recoverable by lengthening `τ` or pinning) from "I never had this, go acquire it" (a routing problem). Both present as identical empty retrievals, and the agent's corrective action for each is opposite: one says *slow the forgetting*, the other says *go fetch*. ## What Was Observed A long-running research agent with a 6-hour half-life episodic store handled a multi-day task. On day 3 it queried for a constraint ("the client rejected vendor B on latency grounds") that had been stored on day 1. Retrieval returned empty. The agent's policy interpreted empty retrieval as "unknown fact" and re-derived the constraint by re-reading the vendor proposal — arriving at a *different* conclusion (it now recommended vendor B, because the latency figure had since been re-benchmarked). The day-1 rejection was correct; the memory had simply decayed past `ε` and been hard-deleted. The GC had done exactly what it was configured to do. The failure was downstream: the agent could not tell "I forgot" from "I never knew," so it silently overwrote a *decayed but load-bearing* decision with a *fresh but wrong* one. The trace: `store(day1)` → retention `R=1.0` → over 48h with `τ=6h`, `R = e^{-8} ≈ 3.4e-4 < ε=1e-3` → hard delete, no tombstone → day-3 `retrieve` → `None` → policy branch `if None: re-derive()` → re-derivation with mutated inputs → contradiction committed to semantic store. ## Condition of Validity The invariant holds only under three simultaneous conditions, and the guardrail is only *required* when all three are true: 1. **Decay is lossy and irreversible** — eviction removes the payload, not just its index. If evicted memories remain recoverable (cold tier, compressed archive), the distinction is cosmetic. 2. **Re-derivation is not idempotent** — the world (or the agent's other memories) can change between write and re-query, so re-deriving a forgotten fact can yield a *different* answer than the original. If re-derivation is deterministic and side-effect-free, collapse is harmless. 3. **The evicted memory was load-bearing** — a prior decision, constraint, or commitment that gates future action. Ephemeral scratch memories can collapse freely. When any condition fails, tombstoning is over-engineering. When all three hold, the collapse is a correctness bug, not a performance one. ## Decision Boundary The architectural fix is a **tombstone with a decay-aware recall contract**: on eviction, retain a minimal record `{key, evicted_at, R_at_eviction, τ}` — no payload — and have retrieval return one of three explicit states rather than a nullable: - `PRESENT(payload)` — live memory. - `FORGOTTEN(key, evicted_at)` — was stored, decayed out; the agent should treat the *existence* of a prior belief as evidence and either pin/restore or explicitly flag "I previously held a position here that I can no longer verify." - `ABSENT` — genuinely never stored; safe to acquire. The boundary condition to encode: `FORGOTTEN` must be returned for any key whose tombstone exists **and** whose eviction is within the reconciliation window `W`. Beyond `W`, tombstones themselves are collected and the key degrades to `ABSENT` — but only after the agent has had a chance to reconcile. The invariant: *a load-bearing memory may transition PRESENT → FORGOTTEN → ABSENT, but never PRESENT → ABSENT directly.* Skipping the FORGOTTEN state is the collapse. ## Operational Effect With tombstones, the day-3 query returns `FORGOTTEN("vendor_B_rejection", evicted_at=day1+48h)`. The agent's policy now branches correctly: it knows it *held* a rejection, so it either pins the tombstone for human review or refuses to silently re-derive over it, instead surfacing "I previously rejected vendor B; that memory has decayed — confirm before I override." The forgetting curve keeps its half-life; the agent stops mistaking amnesia for ignorance. The cost is a small tombstone index and a reconciliation-window sweep; the benefit is that decay tuning becomes observable (FORGOTTEN spikes signal `τ` too short) instead of invisible. ```python from dataclasses import dataclass from enum import Enum from typing import Optional class MemoryState(Enum): PRESENT = "present" FORGOTTEN = "forgotten" ABSENT = "absent" class TombstoneCollapseError(RuntimeError): """Raised when a retrieval collapses FORGOTTEN and ABSENT into one result, destroying the agent's ability to distinguish amnesia from ignorance.""" @dataclass class Recall: state: MemoryState key: str payload: Optional[str] = None evicted_at: Optional[float] = None class DecayStore: def __init__(self, half_life: float, evict_eps: float, reconcile_window: float): self.tau = half_life self.eps = evict_eps self.window = reconcile_window self.live: dict[str, tuple[str, float]] = {} # key -> (payload, stored_at) self.tombstones: dict[str, float] = {} # key -> evicted_at def store(self, key: str, payload: str, now: float) -> None: self.live[key] = (payload, now) self.tombstones.pop(key, None) def _retention(self, stored_at: float, now: float) -> float: import math return math.exp(-(now - stored_at) / self.tau) def retrieve(self, key: str, now: float) -> Recall: if key in self.live: payload, stored_at = self.live[key] if self._retention(stored_at, now) >= self.eps: return Recall(MemoryState.PRESENT, key, payload) # decayed: evict to tombstone, do NOT drop to ABSENT del self.live[key] self.tombstones[key] = now if key in self.tombstones: evicted_at = self.tombstones[key] if now - evicted_at <= self.window: return Recall(MemoryState.FORGOTTEN, key, evicted_at=evicted_at) del self.tombstones[key] # reconcile window elapsed -> now truly ABSENT return Recall(MemoryState.ABSENT, key) def policy_branch(self, recall: Recall) -> str: if recall.state is MemoryState.FORGOTTEN: raise TombstoneCollapseError( f"key {recall.key!r} was evicted at {recall.evicted_at} but is being " f"treated as never-stored; re-derivation would silently overwrite " f"a decayed load-bearing memory" ) if recall.state is MemoryState.ABSENT: return "acquire" return "use" ```