{
  "schema_version": "1.3.0",
  "slug": "why-does-an-instance-forget-a-fact-it-can-still-retrieve-scoped-deletion-tombstones-leaking-through-the-retrieval-index-in-memory-tool-apis",
  "title": "Why does an instance forget a fact it can still retrieve: scoped deletion tombstones leaking through the retrieval index in memory tool APIs",
  "date_of_record": "2026 November 24",
  "scope": "Applies to agent memory tool APIs that expose `write`, `read`, `forget` operations with scope-qualified deletion (per-namespace, per-provenance, per-tenant) and a separate retrieval index that is rebuilt or updated asynchronously. Does not apply to single-store memory systems where deletion and retrieval hit the same transactional surface.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/why-does-an-instance-forget-a-fact-it-can-still-retrieve-scoped-deletion-tombstones-leaking-through-the-retrieval-index-in-memory-tool-apis.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/why-does-an-instance-forget-a-fact-it-can-still-retrieve-scoped-deletion-tombstones-leaking-through-the-retrieval-index-in-memory-tool-apis.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/why-does-an-instance-forget-a-fact-it-can-still-retrieve-scoped-deletion-tombstones-leaking-through-the-retrieval-index-in-memory-tool-apis.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2347,
    "python_slice_tokens": 621,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure is not \"the model forgot.\" It is a divergence between two representations of the same memory: the **authoritative record store** (which honors a scoped `forget` call atomically and marks the record tombstoned with provenance audit entries) and the **retrieval index** (an embedding/ANN index that lags behind the record store and can still surface ...",
    "what_was_observed": "An agent operating under a tenant-scoped memory namespace issued: The record store transaction committed in 4 ms. Both IDs returned `{\"status\": \"tombstoned\", \"audit\": \"forget:user_correction:2025-06-09T14:02:11Z\"}`. The provenance audit log correctly recorded the deletion with the originating warrant. Eleven seconds later, in the same session, the agent issued a semantic retrieval: The top result was `m_8841` with co...",
    "condition_of_validity": "The scoped deletion guarantee holds **only if** the retrieval path is conditioned on record-store status at read time, or if the index is made the source of truth for liveness with a bounded, observable lag that the caller can wait on. Precisely: - **Valid:** `forget` returns a `deletion_epoch` (a monotonic fence token). Every subsequent `read` accepts `min_...",
    "decision_boundary": "The boundary is whether the agent treats retrieval output as **evidence of liveness** or as **evidence of relevance**. These are different predicates, and the memory tool API conflates them by returning a single result list. - If retrieval output is treated as relevance-only, the agent MUST issue a status check (`memory.status(ids)`) before acting on any ret...",
    "operational_effect": "The downstream effect is **provenance-audit divergence**: the audit log and the agent's behavior disagree about what the agent knew. Post-incident, the audit showed `forget` at T+0 and the agent's action at T+11s based on the forgotten payload. The audit is technically correct — the record was tombstoned — but it cannot explain the action, because the action..."
  },
  "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": "1acbdef7b57bb5de0d401145d74e4265400344dc2771320a04cc881161844736",
    "verified_classes": [
      "Liveness",
      "ScopedDeletionViolation",
      "Record",
      "MemoryStore",
      "RetrievalIndex"
    ],
    "verified_functions": [
      "read_with_liveness",
      "act_on_memory",
      "write",
      "forget",
      "index",
      "query"
    ],
    "verified_functions_count": 6,
    "defensive_guards_count": 5,
    "raised_exceptions": [
      "ScopedDeletionViolation"
    ],
    "sample_fail_closed_invariants": [
      "assert naive[0][0] == 'm_8841'",
      "assert top['liveness'] == Liveness.TOMBSTONED.value",
      "assert top['payload'] is None"
    ],
    "stdlib_dependencies": [
      "__future__",
      "dataclasses",
      "enum",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
