{
  "schema_version": "1.3.0",
  "slug": "what-happens-when-an-instance-deletes-a-memory-scope-that-its-own-in-flight-tool-call-is-still-reading-from",
  "title": "What happens when an instance deletes a memory scope that its own in-flight tool call is still reading from",
  "date_of_record": "2026 November 27",
  "scope": "Applies to agent runtimes that expose explicit `read_memory`, `write_memory`, and `forget_memory` (or equivalently named) tools bound to named scopes with retention/deletion semantics, where a single reasoning turn can issue multiple tool calls against the same scope. Does not apply to append-only memory stores with no deletion primitive, nor to scopes that are immutable for the lifetime of a session.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-deletes-a-memory-scope-that-its-own-in-flight-tool-call-is-still-reading-from.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-deletes-a-memory-scope-that-its-own-in-flight-tool-call-is-still-reading-from.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-deletes-a-memory-scope-that-its-own-in-flight-tool-call-is-still-reading-from.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2301,
    "python_slice_tokens": 599,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "There are two different questions a memory tool API can answer, and most implementations conflate them: 1. *Does this scope exist and is it readable by this principal?* (an authorization/namespace question) 2. *Does the content I just read still describe the store's current state?* (a linearizability question) A `forget_memory(scope)` call is typically imple...",
    "what_was_observed": "A planning agent running a multi-step task against a scoped memory store (`task_ctx`, TTL-bound to the task) emitted a batched tool call on step 7: The intent was: read the current stack, clear the scope, write the new stack. The runtime executed the three calls concurrently (the tool dispatcher parallelizes sibling calls when they are declared independent). Observed sequence: - `forget_memory` committed at t=41ms, t...",
    "condition_of_validity": "The invariant that must hold for scoped forget to be safe under concurrent agent tool calls: > For any scope S, once `forget_memory(S)` returns a tombstone T, every subsequent read or write against S must either fail with a tombstone-referencing error or return a result explicitly tagged with generation ≥ T.gen. A read that began before T and completes after...",
    "decision_boundary": "The runtime must choose, per turn, between two postures: - **Serialized scope mutation.** Any `forget_memory` on scope S forces all other calls on S in the same turn to queue behind it. Reads issued before the forget are *cancelled and re-issued* after it, or returned as `{\"status\": \"superseded\", \"by_tombstone\": T}` and the model is required to re-read. Cost...",
    "operational_effect": "When the invariant is violated, the observable effect at the agent layer is **silent belief divergence**: the model's working context contains memory content that the store has committed to forgetting, and the model has no signal that this content is orphaned. Downstream, this manifests as: - **Duplicated work** when a read-before-forget returns a subgoal st..."
  },
  "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": "21bea21e66b150c28cadcadb8b29dd75cf4f8fb049610693107fafa048c690bf",
    "verified_classes": [
      "OrphanedReadError",
      "ScopeResurrectionError",
      "Tombstone",
      "ReadResult",
      "TurnMemoryLedger"
    ],
    "verified_functions": [
      "dispatch_sibling_calls",
      "record_forget",
      "admit_read",
      "admit_write"
    ],
    "verified_functions_count": 4,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "OrphanedReadError",
      "ScopeResurrectionError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "__future__",
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
