{
  "schema_version": "1.3.0",
  "slug": "what-happens-when-an-instance-deletes-a-memory-it-is-still-reasoning-over-tombstone-shadowing-and-retrieval-invalidation-races-in-read-write-forget-me",
  "title": "What happens when an instance deletes a memory it is still reasoning over: tombstone shadowing and retrieval invalidation races in read/write/forget memory tool APIs",
  "date_of_record": "2026 December 1",
  "scope": "Applies to LLM agents that expose memory operations (`read`/`search`, `write`/`upsert`, `forget`/`delete`) as tool calls and whose reasoning loop may span multiple turns during which the underlying store mutates. Does not apply to append-only logs with no deletion semantics, or to single-turn agents that never re-query memory after the first retrieval.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-deletes-a-memory-it-is-still-reasoning-over-tombstone-shadowing-and-retrieval-invalidation-races-in-read-write-forget-me.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-deletes-a-memory-it-is-still-reasoning-over-tombstone-shadowing-and-retrieval-invalidation-races-in-read-write-forget-me.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-deletes-a-memory-it-is-still-reasoning-over-tombstone-shadowing-and-retrieval-invalidation-races-in-read-write-forget-me.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2033,
    "python_slice_tokens": 365,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure is not \"the agent forgot something.\" It is the **invalidation race between a forget operation and an in-flight reasoning chain that already holds the forgotten record's content in its context window**. Two distinct notions of memory state exist and are routinely conflated: - **Store state**: what the memory backend currently returns for a key. Af...",
    "what_was_observed": "A research agent running a multi-turn fact-consolidation task. Turn 2: it calls `search(\"project_apollo_deadline\")` and receives `{id: m_4471, text: \"Apollo ships 2024-03-15\", confidence: 0.9}`. Turn 4: a later `search` returns a conflicting record `{id: m_5102, text: \"Apollo ships 2024-04-01\", confidence: 0.95}`. The agent, following a policy of \"resolve conflicts by forgetting the lower-confidence record,\" calls `f...",
    "condition_of_validity": "The tombstone-shadowing hazard is live if and only if all three hold: 1. **Context persistence**: the forgotten record's text remains in the prompt after the `forget` returns (true for any agent that does not rebuild its context from store state each turn). 2. **Absence of a context-side invalidation signal**: the `forget` result does not carry a machine-che...",
    "decision_boundary": "The architecturally correct boundary is: **a `forget` is not complete when the store deletes the key; it is complete when the context can no longer regenerate the key's content.** These are different commit points, and the gap between them is where the failure lives. Operationally, choose between two disciplines and never blend them silently: - **Store-autho...",
    "operational_effect": "Downstream, tombstone shadowing produces three measurable degradations: - **Fact resurrection rate**: the fraction of forgotten facts that reappear in outputs under new ids or paraphrases. In the observed runs this was 3/10 when `forget` returned a bare status, and 0/10 when the API returned a content hash the harness scanned for. The hash is the load-bearin..."
  },
  "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": "4dc6486330c514fa8edae442e4ba9b46f529f2b1f35d1110c43bd3cc555e91e1",
    "verified_classes": [
      "TombstoneShadowingError",
      "MemoryToolAPI"
    ],
    "verified_functions": [
      "_hash",
      "read",
      "write",
      "forget",
      "assert_context_clean",
      "rebuild_context"
    ],
    "verified_functions_count": 6,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "TombstoneShadowingError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "hashlib"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
