{
  "schema_version": "1.3.0",
  "slug": "why-does-an-instance-resurrect-deleted-memories-when-a-scoped-retention-forget-call-races-an-in-flight-read-modify-write",
  "title": "Why does an instance resurrect deleted memories when a scoped retention forget call races an in-flight read-modify-write?",
  "date_of_record": "2026 November 22",
  "scope": "Applies to agent memory subsystems exposing explicit `read`/`write`/`forget` tool APIs with per-scope retention policies (TTL, legal-hold, scope-tag) and a verifiable-deletion contract (tombstones or Merkle proofs of erasure). Does not cover append-only logs with no mutation surface, nor KV caches where deletion is a cache eviction with no durability guarantee.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/why-does-an-instance-resurrect-deleted-memories-when-a-scoped-retention-forget-call-races-an-in-flight-read-modify-write.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/why-does-an-instance-resurrect-deleted-memories-when-a-scoped-retention-forget-call-races-an-in-flight-read-modify-write.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/why-does-an-instance-resurrect-deleted-memories-when-a-scoped-retention-forget-call-races-an-in-flight-read-modify-write.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1647,
    "python_slice_tokens": 195,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "A `forget` call is not a delete. It is a *retention transition*: the record moves from a live scope to a tombstoned scope, and the read path must be taught to honor the tombstone. The failure mode is not \"the delete didn't happen\" — it is that the delete happened, was acknowledged, and was then *undone by a concurrent writer that had already read the pre-del...",
    "what_was_observed": "An agent runs a `read(scope=\"user:42/profile\")` that returns record `R` with `version=17` and a retention tag `ttl=30d`. Mid-turn, a retention policy fires on a different scope and the orchestrator issues `forget(id=R, scope=\"user:42/profile\", warrant=W)`. The memory service tombstones `R`, writes a deletion proof, and returns `{\"deleted\": true, \"proof\": ...}`. The agent, still executing its original turn, performs a...",
    "condition_of_validity": "The resurrection is bounded by a precise invariant: **a `forget` is only honored by readers whose read snapshot post-dates the tombstone's commit, and only by writers whose payload lineage is checked against the tombstone set.** The failure requires the conjunction of: - An in-flight read whose snapshot predates the `forget` commit (stale-snapshot read). - A...",
    "decision_boundary": "The architectural fork is whether `forget` is *eager* (invalidates snapshots, blocks in-flight writers) or *lazy* (tombstones and relies on writers to re-validate). Eager forget is correct but stalls agent turns for the duration of the retention sweep — unacceptable for long-running turns. Lazy forget is fast but requires the write-path lineage check, which ...",
    "operational_effect": "The practical consequence is that **deletion acknowledgements are not trust boundaries for agents**. An agent that receives `{\"deleted\": true}` must not treat its in-context copy as authoritative for subsequent writes in the same turn. The orchestrator must either (1) invalidate the turn's snapshot token on any `forget` that intersects its read set, forcing ..."
  },
  "matched_failure_symptoms": [
    "DOMAIN:EPISTEMIC_PROVENANCE_AND_FEDERATION_ROUTING"
  ],
  "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": "5165369d8e90633a2c71fdce1ab3b8f51371c638149f346f19ba5ea02cdfbe31",
    "verified_classes": [
      "ResurrectionError",
      "SnapshotToken",
      "TombstoneIndex"
    ],
    "verified_functions": [
      "validated_write",
      "forget",
      "intersects"
    ],
    "verified_functions_count": 3,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "ResurrectionError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
