{
  "schema_version": "1.3.0",
  "slug": "which-invariants-prevent-scoped-forget-operations-from-silently-resurrecting-deleted-memory-in-agent-tool-schemas",
  "title": "Which invariants prevent scoped-forget operations from silently resurrecting deleted memory in agent tool schemas",
  "date_of_record": "2026 November 29",
  "scope": "Applies to agents whose memory is mediated by explicit `read`/`write`/`forget` tool calls with per-scope retention and deletion guarantees, where a `forget` call is expected to make a record unreachable in all future reads. Does not cover implicit context-window eviction, model-weight editing, or external vector-store garbage collection outside the agent's tool surface.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/which-invariants-prevent-scoped-forget-operations-from-silently-resurrecting-deleted-memory-in-agent-tool-schemas.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/which-invariants-prevent-scoped-forget-operations-from-silently-resurrecting-deleted-memory-in-agent-tool-schemas.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/which-invariants-prevent-scoped-forget-operations-from-silently-resurrecting-deleted-memory-in-agent-tool-schemas.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1871,
    "python_slice_tokens": 426,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "A `forget` operation has two distinct semantics that are routinely conflated in tool schemas: **logical deletion** (the record is marked tombstoned and excluded from read results) and **physical deletion** (the bytes are gone and unrecoverable). Most agent memory schemas advertise \"deletion guarantees\" while only implementing logical deletion, and they do so...",
    "what_was_observed": "An agent running a long-horizon task used a memory tool with three operations: - `write(scope, content, ttl)` → returns `memory_id` - `read(scope, query)` → returns ranked records - `forget(memory_id)` → returns `{deleted: true, scope: ...}` The backing store had an automatic distillation job: when the episodic buffer for a scope exceeded N records, a summarizer merged them into a single semantic record in the same s...",
    "condition_of_validity": "The failure is bounded by whether the distillation pass is **synchronous with respect to the forget barrier**. Two conditions must both hold for the tombstone to be sound: 1. **Provenance closure is recorded at derivation time.** Each derived record stores the set of source `memory_id`s it was built from. Without this, cascade is impossible after the fact. 2...",
    "decision_boundary": "The agent must decide, per scope, which deletion contract it is actually operating under: - **Record-scoped deletion** (`forget` removes the addressed record only): safe only when no derivation pipeline exists, or when the agent never writes sensitive facts into a scope that has distillation enabled. - **Fact-scoped deletion** (cascade over provenance closur...",
    "operational_effect": "The practical consequence for an agent is that **deletion must be verified by read-back, not by return value**. After `forget`, the agent should issue a semantic `read` for the distinctive tokens of the forgotten fact and treat any hit as a failed deletion requiring escalation (forget the surfaced record, or quarantine the scope). The return value of `forget..."
  },
  "matched_failure_symptoms": [
    "OOM_KILL_OR_MEMORY_EXHAUSTION",
    "SCHEMA_DRIFT_OR_COERCION_CRASH"
  ],
  "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": "4fc6bc44f92d206d5f05b640c27ec7ec41e2fad81083aba95e6fe3769b8dfc81",
    "verified_classes": [
      "DeletionCascadeIncomplete",
      "MemoryStore"
    ],
    "verified_functions": [
      "forget_and_verify",
      "__init__",
      "write",
      "distill",
      "forget",
      "read"
    ],
    "verified_functions_count": 6,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "DeletionCascadeIncomplete",
      "KeyError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
