{
  "schema_version": "1.3.0",
  "slug": "why-does-an-instance-forget-mid-task-when-a-memory-tool-s-retention-policy-silently-evicts-the-write-it-just-acknowledged",
  "title": "Why does an instance forget mid-task when a memory tool's retention policy silently evicts the write it just acknowledged?",
  "date_of_record": "2026 November 27",
  "scope": "Applies to agents that persist state through explicit memory-tool calls (`write`, `read`, `forget`) carrying per-record retention/TTL metadata, where the tool returns an acknowledgment before the record is durably committed. Does not apply to single-turn stateless inference or to stores that commit synchronously before returning.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/why-does-an-instance-forget-mid-task-when-a-memory-tool-s-retention-policy-silently-evicts-the-write-it-just-acknowledged.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/why-does-an-instance-forget-mid-task-when-a-memory-tool-s-retention-policy-silently-evicts-the-write-it-just-acknowledged.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/why-does-an-instance-forget-mid-task-when-a-memory-tool-s-retention-policy-silently-evicts-the-write-it-just-acknowledged.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1782,
    "python_slice_tokens": 526,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure is not \"memory was lost.\" It is a divergence between **acknowledgment semantics** and **durability semantics** across a retention-policy boundary. A memory tool can legitimately return `{\"status\":\"stored\",\"id\":\"m_7f3\",\"ttl_s\":900}` while the retention daemon, operating on a separate clock, has already classified the record as expired because the ...",
    "what_was_observed": "A planning agent executing a 40-step build task wrote a critical intermediate artifact — a computed dependency graph — at step 6 via `memory.write(key=\"depgraph\", value=..., retention=\"ephemeral\")`. The tool acked in 41ms. At step 22 the agent called `memory.read(key=\"depgraph\")` and received `{\"status\":\"not_found\"}`. The agent, lacking a recovery branch for a missing key it had \"successfully\" written, re-derived the...",
    "condition_of_validity": "This analysis holds when all of the following are true: - The memory tool returns an ack **before** durability is guaranteed (async commit or lease-based storage). - Retention is expressed as a TTL or policy class resolved **server-side**, not by the caller. - The agent's task duration is **not bounded relative to the shortest retention class it uses** — i.e...",
    "decision_boundary": "The boundary is **the ratio of task horizon to retention horizon, evaluated at write time.** Concretely: if `expected_remaining_task_time > retention_ttl_of_class`, the write is a lie the agent tells itself. The guardrail: the agent must, at write time, compare the retention class it is about to use against its own remaining-horizon estimate and either (1) e...",
    "operational_effect": "Downstream, this produces the classic silent-corruption signature: the task reports success, the output is internally consistent, and the corruption is only detectable by replaying the task against a store that retained everything. The agent's reasoning loop never saw an error — it saw a `not_found` it had a (wrong) branch for, and that branch produced plaus..."
  },
  "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": "6a4f652c6f1302dedb20277e1313d04ccd1e51c505abb943d43119b08762dae1",
    "verified_classes": [
      "RetentionHorizonViolation",
      "EvictedKeyMisread",
      "RetentionClass",
      "MemoryTool"
    ],
    "verified_functions": [
      "guarded_write",
      "guarded_read",
      "__init__",
      "write",
      "read"
    ],
    "verified_functions_count": 5,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "EvictedKeyMisread",
      "RetentionHorizonViolation"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "time"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
