{
  "schema_version": "1.3.0",
  "slug": "why-does-an-instance-delete-a-memory-scope-and-still-answer-from-it-in-the-same-turn",
  "title": "Why does an instance delete a memory scope and still answer from it in the same turn",
  "date_of_record": "2026 November 25",
  "scope": "Applies to agents whose memory subsystem exposes explicit `read`, `write`, and `forget` tool calls with per-scope retention windows and deletion semantics, where the model's context window can hold retrieved content across multiple tool invocations. Does not apply to stateless retrieval-augmented systems that re-query an external store on every generation step, nor to systems where `forget` is implemented as a hard synchronous purge of the model's working context.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/why-does-an-instance-delete-a-memory-scope-and-still-answer-from-it-in-the-same-turn.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/why-does-an-instance-delete-a-memory-scope-and-still-answer-from-it-in-the-same-turn.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/why-does-an-instance-delete-a-memory-scope-and-still-answer-from-it-in-the-same-turn.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2266,
    "python_slice_tokens": 508,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "There are two distinct notions of \"deleted\" that agents routinely conflate: **store-level deletion** (the backing record is removed or tombstoned such that future `read` calls return nothing) and **context-level eviction** (the tokens representing that record are removed from the active context window so the model can no longer condition on them). A `forget`...",
    "what_was_observed": "An agent was configured with a scoped memory tool. Each scope carried a retention policy (`ttl_seconds`) and a deletion mode. On a user request to purge a scope, the agent issued: The tool returned success. A subsequent `read(scope=\"billing_prefs\")` in the *same turn* correctly returned `{\"status\": \"empty\"}`. The agent then answered a follow-up question about the user's billing preferences—and produced the exact valu...",
    "condition_of_validity": "The invariant that must hold for `forget` to mean what agents assume: > **For any scope S and any turn T, if `forget(S)` returned success before T, then no token in the context at T may encode a record from S, and no downstream agent may read a record from S under any principal.** This invariant is *false* in essentially every real implementation, for three ...",
    "decision_boundary": "The agent must not treat `forget` success as license to answer as if it never knew the content. The correct decision procedure at the boundary: - **After any `forget` or TTL expiry, prior reads of that scope are *tainted*.** They may be used to reason about *that a deletion occurred*, but not as a source of *values*. If a question requires values from a forg...",
    "operational_effect": "The practical consequence is that deletion in agent memory systems is a *two-phase* operation that most implementations only half-perform. Phase one (store purge) is what the tool reports. Phase two (context eviction + peer revocation) is what the agent actually needs, and it is usually missing. The gap produces three observable failure classes: - **Ghost an..."
  },
  "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": "3a636441d8d39e56c090b367e80c84544d8fcae0158ddb55d4c3f1281861597f",
    "verified_classes": [
      "GhostMemoryError",
      "ScopeState",
      "AgentMemoryView"
    ],
    "verified_functions": [
      "run_turn",
      "read",
      "forget",
      "emit"
    ],
    "verified_functions_count": 4,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "GhostMemoryError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
