{
  "schema_version": "1.3.0",
  "slug": "why-does-an-instance-observe-phantom-memory-after-a-scoped-namespace-delete-tombstone-ordering-and-the-ttl-resurrection-window-in-agent-memory-tool-ap",
  "title": "Why does an instance observe phantom memory after a scoped namespace delete: tombstone ordering and the TTL-resurrection window in agent memory tool APIs",
  "date_of_record": "2026 November 22",
  "scope": "Applies to any agent that writes to a scoped memory namespace exposed through a read/write/forget tool API with per-entry TTL and asynchronous deletion propagation. Does not apply to single-process, single-writer stores where read and write share one transactional boundary and deletion is synchronous.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/why-does-an-instance-observe-phantom-memory-after-a-scoped-namespace-delete-tombstone-ordering-and-the-ttl-resurrection-window-in-agent-memory-tool-ap.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/why-does-an-instance-observe-phantom-memory-after-a-scoped-namespace-delete-tombstone-ordering-and-the-ttl-resurrection-window-in-agent-memory-tool-ap.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/why-does-an-instance-observe-phantom-memory-after-a-scoped-namespace-delete-tombstone-ordering-and-the-ttl-resurrection-window-in-agent-memory-tool-ap.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2058,
    "python_slice_tokens": 502,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The distinction that matters is between *deletion accepted* and *deletion observed*. A `forget` call on a scoped namespace is almost always a two-phase operation: the control plane acknowledges the tombstone (fast, synchronous, local), while the data plane propagates that tombstone to every replica, cache, and retrieval index that may still hold a live copy ...",
    "what_was_observed": "An agent instance running a long multi-step task held a working set in namespace `task:7f3a`. At step 41 the orchestrator issued `forget(namespace=\"task:7f3a\", scope=\"hard\")` to satisfy a data-retention obligation after a subtask completed. The control plane returned `{\"deleted\": 214, \"tombstones_issued\": 214, \"propagation\": \"pending\"}` in 12 ms. The orchestrator treated this as closure and moved on. At step 43 the s...",
    "condition_of_validity": "The tombstone-versus-write race is only a real hazard under a specific conjunction of conditions. If any one is absent, the failure does not occur and the guardrail is unnecessary overhead. 1. **Asynchronous propagation.** Tombstone application to replicas is not synchronous with the `forget` acknowledgement. If `forget` returns only after all replicas have ...",
    "decision_boundary": "The boundary is between *treating forget as a barrier* and *treating forget as an intent*. An agent must decide, per namespace, which semantics it is relying on, and the store must expose enough information to make that decision. - If the store returns `propagation: \"pending\"` or any equivalent, the agent MUST NOT treat the namespace as closed. It must eithe...",
    "operational_effect": "With the guardrail in place, the failure mode changes from silent permanent divergence to a bounded, observable stall. The instance that would have resurrected 3 entries instead receives a `StaleEpochWrite` rejection at step 43, halts the refresh path, and waits for propagation—costing one round-trip of latency but preserving the retention guarantee. The col..."
  },
  "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": "99714d06e3afb066036898c5096e95488c265e0f8d68fd45f1ad37d535bf0f82",
    "verified_classes": [
      "StaleEpochWrite",
      "PropagationPending",
      "ForgetState",
      "NamespaceEpoch",
      "MemoryStore"
    ],
    "verified_functions": [
      "resume_task",
      "_epoch",
      "forget",
      "confirm_propagation",
      "write",
      "read"
    ],
    "verified_functions_count": 6,
    "defensive_guards_count": 4,
    "raised_exceptions": [
      "PropagationPending",
      "StaleEpochWrite"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "__future__",
      "dataclasses",
      "enum",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
