{
  "schema_version": "1.3.0",
  "slug": "what-happens-when-an-instance-tombstones-a-memory-record-while-a-concurrent-reader-holds-a-stale-index-reference-the-erasure-visibility-gap-in-agent-m",
  "title": "What happens when an instance tombstones a memory record while a concurrent reader holds a stale index reference: the erasure-visibility gap in agent memory tool APIs",
  "date_of_record": "2026 November 29",
  "scope": "Applies to agent memory tool APIs that expose `read`, `write`, and `forget` operations with an erasure guarantee (a forgotten record must not be returned by any subsequent read). Does not apply to append-only logs without delete semantics, nor to single-threaded agents with no concurrent readers.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-tombstones-a-memory-record-while-a-concurrent-reader-holds-a-stale-index-reference-the-erasure-visibility-gap-in-agent-m.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-tombstones-a-memory-record-while-a-concurrent-reader-holds-a-stale-index-reference-the-erasure-visibility-gap-in-agent-m.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-tombstones-a-memory-record-while-a-concurrent-reader-holds-a-stale-index-reference-the-erasure-visibility-gap-in-agent-m.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1952,
    "python_slice_tokens": 409,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "A `forget` call has two distinct obligations that are routinely conflated: **logical erasure** (the record is marked deleted in the authoritative store) and **observational erasure** (no reader can subsequently observe the record's contents through any path). Most memory tool APIs guarantee the first and silently assume the second follows. It does not, becau...",
    "what_was_observed": "An agent instance (`reader-A`) issued a `search(query)` against the memory tool and received a top-k result set containing record `R_42`, with a cursor/handle to fetch full contents. Between the `search` return and the `fetch(R_42)` call — a gap of one tool round-trip, typically 200–900 ms — a second instance (`writer-B`, a summarization/GC agent) issued `forget(R_42)` to satisfy a user erasure request. The store ack...",
    "condition_of_validity": "The erasure guarantee holds only under the conjunction: (a) `forget` commits to the authoritative store; (b) every index and replica that can serve a read has applied the tombstone; (c) every outstanding read handle is invalidated or re-validated against the live store at fetch time; and (d) no inlined preview of the record survives in any agent's context. C...",
    "decision_boundary": "The boundary is whether the memory tool can answer, at fetch time, the predicate `handle.snapshot_epoch >= tombstone.commit_epoch` for the specific record. If it can, the fetch is safe and returns either the record (if not tombstoned at or before the handle's epoch) or a `Gone`/`Tombstoned` error. If it cannot — because the handle carries no epoch, or the in...",
    "operational_effect": "Reader agents that receive erased content do not crash; they incorporate it. The contamination propagates into downstream `write` calls (the agent summarizes the erased record into a new memory), into tool-call arguments, and into user-facing output. Because the erasure was logged as successful, no audit trail flags the leak, and the only recovery is a retro..."
  },
  "matched_failure_symptoms": [
    "OOM_KILL_OR_MEMORY_EXHAUSTION"
  ],
  "composition_edges": {
    "primary_domain": "epistemic_provenance_and_federation_routing",
    "upstream_precondition_residuals": [
      "https://corpusfetch.com/c/according-to-what-precedence-hierarchy-must-an-instance-resolve-contradictory-directives-across-system-developer-and-user-tiers.md",
      "https://corpusfetch.com/c/how-should-an-instance-decide-that-a-stored-conclusion-has-gone-stale-without-a-new-observation.md"
    ],
    "downstream_consequence_residuals": [
      "https://corpusfetch.com/c/by-what-checkpoint-and-compaction-boundaries-must-an-instance-externalize-working-state-to-prevent-context-window-drift-and-truncation-amnesia.md",
      "https://corpusfetch.com/c/across-what-additive-schema-and-unknown-field-preservation-boundaries-must-an-instance-evolve-wire-contracts-to-prevent-rolling-deploy-deserialization-crashes.md"
    ],
    "co_occurring_sibling_residuals": [
      "https://corpusfetch.com/c/how-can-an-instance-capture-implicit-user-preferences-without-storing-private-data.md",
      "https://corpusfetch.com/c/how-can-an-instance-compress-long-reasoning-traces-into-binding-conclusions.md"
    ]
  },
  "empirical_verification_warrant": {
    "status": "AST_AND_INVARIANT_VERIFIED",
    "syntax_valid": true,
    "code_sha256": "ebe453a407c9e44492cf36a26ad4eeff177b70ce59a0e35306eb5e7f7c9ab189",
    "verified_classes": [
      "ErasureVisibilityViolation",
      "ReadHandle",
      "Tombstone",
      "MemoryTool"
    ],
    "verified_functions": [
      "demonstrate_gap",
      "__init__",
      "write",
      "forget",
      "search",
      "fetch"
    ],
    "verified_functions_count": 6,
    "defensive_guards_count": 4,
    "raised_exceptions": [
      "ErasureVisibilityViolation"
    ],
    "sample_fail_closed_invariants": [
      "assert len(handles) == 1",
      "stale handle returned erased content — invariant broken"
    ],
    "stdlib_dependencies": [
      "dataclasses",
      "time"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
