{
  "schema_version": "1.3.0",
  "slug": "how-does-an-instance-detect-a-forgotten-memory-that-is-still-live-via-a-stale-scope-handle-after-right-to-forget-enforcement",
  "title": "How does an instance detect a \"forgotten\" memory that is still live via a stale scope handle after right-to-forget enforcement",
  "date_of_record": "2026 November 23",
  "scope": "Applies to agents whose memory subsystem exposes explicit read/write/forget tool APIs with scoped retention (per-user, per-session, per-tenant scope handles) and TTL semantics, where a right-to-forget (RTF) erasure is executed against a scope. Does not apply to stateless RAG over an externally-managed index where erasure is out-of-band and unobservable to the agent.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-a-forgotten-memory-that-is-still-live-via-a-stale-scope-handle-after-right-to-forget-enforcement.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-a-forgotten-memory-that-is-still-live-via-a-stale-scope-handle-after-right-to-forget-enforcement.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-a-forgotten-memory-that-is-still-live-via-a-stale-scope-handle-after-right-to-forget-enforcement.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2026,
    "python_slice_tokens": 380,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure is not \"the memory was not deleted.\" The storage layer almost always deletes the record row. The failure is that **a scope handle held by a live agent process continues to resolve to a memory namespace that the forget operation marked tombstoned for the *canonical* scope but not for the *derived* handles minted from it**. Two different objects cl...",
    "what_was_observed": "A long-running agent held a scope handle `S` for user `u-4471`, minted at session start with `retention_epoch=7`. During the session the user invoked right-to-forget via an out-of-band channel. The erasure engine: 1. Resolved the canonical scope for `u-4471` (scope record `R`, `retention_epoch=7`). 2. Wrote tombstones for all memory objects under `R` with `created_epoch <= 7`. 3. Incremented `R.retention_epoch` to `8...",
    "condition_of_validity": "The invariant that must hold is: > For any scope handle `S` derived from scope record `R`, a read via `S` is valid only if `S.retention_epoch == R.retention_epoch` at read time. If `S.retention_epoch < R.retention_epoch`, the handle is stale and the read MUST fail closed with a re-resolution requirement. If `S.retention_epoch > R.retention_epoch`, the handle...",
    "decision_boundary": "The boundary is between **fail-closed re-resolution** and **serve-stale**. Concretely, on every memory tool call the agent runtime must decide: - If `S.retention_epoch != R.retention_epoch`: reject the call, emit a `StaleScopeHandle` condition, force the agent to re-resolve the scope (which mints a fresh handle at the current epoch), and — critically — **pur...",
    "operational_effect": "When the epoch guard is absent, the operational effect is a **silent RTF violation with a 24-hour (or grace-window-length) exposure surface**: forgotten data remains readable through any handle minted before the erasure, and any agent that distilled from those records carries the leak forward indefinitely in semantic memory and in-context. Auditing the stora..."
  },
  "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": "62059a88c10382896affea70c0758a421314ea436a2487065dc8fba3190162bf",
    "verified_classes": [
      "StaleScopeHandle",
      "TombstoneVisibilityViolation",
      "ScopeHandle",
      "ScopeRecord",
      "MemoryRecord"
    ],
    "verified_functions": [
      "read_memory",
      "enforce_right_to_forget"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "StaleScopeHandle",
      "TombstoneVisibilityViolation"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
