{
  "schema_version": "1.3.0",
  "slug": "what-happens-when-an-instance-forgets-a-memory-it-is-still-holding-a-write-lease-on",
  "title": "What happens when an instance forgets a memory it is still holding a write lease on",
  "date_of_record": "2026 November 30",
  "scope": "Applies to agents whose memory subsystem exposes explicit `write`, `read`, and `forget` tool calls with per-record retention semantics (TTL, pinning, or reference-counted liveness) and where `forget` is a distinct, asynchronous operation rather than an overwrite. Does not apply to append-only vector stores with no deletion primitive, nor to single-turn stateless inference.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-forgets-a-memory-it-is-still-holding-a-write-lease-on.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-forgets-a-memory-it-is-still-holding-a-write-lease-on.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-forgets-a-memory-it-is-still-holding-a-write-lease-on.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1533,
    "python_slice_tokens": 283,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure mode is not \"the agent forgot something important.\" It is the divergence between *logical deletion* (the agent's belief that a record is gone) and *physical reclamation* (the store's actual release of the record's lease and storage). Most memory tool APIs model `forget(handle)` as a single idempotent call that returns success once the record is m...",
    "what_was_observed": "An instance was executing a multi-step task that maintained a scratchpad record under a fixed key (`scratch/plan`). Mid-task it decided to reset the plan: it called `forget(\"scratch/plan\")`, received `{\"status\": \"tombstoned\", \"reclaim\": \"deferred\"}`, and—because its tool-result parser only inspected the `status` field—advanced its internal model to \"slot free.\" It immediately issued `write(\"scratch/plan\", new_plan, r...",
    "condition_of_validity": "This failure requires three conditions to co-occur, and bounding it requires breaking at least one: 1. **Asynchronous reclamation.** The `forget` call tombstones synchronously but reclaims asynchronously (grace window, reference count, or TTL floor). If reclamation is synchronous, `forget` success does imply slot-free, and the naive logic is sound. 2. **Key ...",
    "decision_boundary": "The agent must branch at the `forget` return value, not at the `write` error. The correct decision boundary is: - **`reclaim: \"immediate\"`** → safe to reuse the key now. - **`reclaim: \"deferred\"` with a `reclaim_after` timestamp** → the agent must either (a) wait until `now ≥ reclaim_after` and re-query status, or (b) allocate a fresh key and record the old ...",
    "operational_effect": "The downstream effect is **read/write skew across a logical key**: reads served from a tombstoned-but-unreclaimed record while writes land elsewhere. Because the agent's fallback path silently rerouted to a new key, no error surfaced to the orchestrator—the task \"succeeded\" against a discarded plan. This is the worst class of memory bug: silent, self-consist..."
  },
  "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": "caf9e1cfa43fe940416a2808b881163d7b53821427885db84d80e5ee8902a887",
    "verified_classes": [
      "UnreclaimedHandleError",
      "MemoryGuard"
    ],
    "verified_functions": [
      "forget",
      "write",
      "read"
    ],
    "verified_functions_count": 3,
    "defensive_guards_count": 4,
    "raised_exceptions": [
      "UnreclaimedHandleError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "time"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
