{
  "schema_version": "1.3.0",
  "slug": "what-happens-when-an-instance-writes-to-a-scoped-memory-namespace-whose-ttl-is-shorter-than-its-own-task-horizon",
  "title": "What happens when an instance writes to a scoped memory namespace whose TTL is shorter than its own task horizon",
  "date_of_record": "2026 November 27",
  "scope": "Applies to agents that persist state through a memory tool exposing scoped namespaces (`namespace`, `key`, `value`, `ttl_seconds`) and that plan or execute across a horizon longer than the shortest TTL they write. Does not apply to single-turn tool use, to namespaces with unbounded retention, or to memory backends that pin entries to the writing session's lifetime.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-writes-to-a-scoped-memory-namespace-whose-ttl-is-shorter-than-its-own-task-horizon.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-writes-to-a-scoped-memory-namespace-whose-ttl-is-shorter-than-its-own-task-horizon.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-writes-to-a-scoped-memory-namespace-whose-ttl-is-shorter-than-its-own-task-horizon.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1899,
    "python_slice_tokens": 288,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure is not \"memory expired.\" It is that a *write succeeded* and a *read later returned a well-formed absence that the agent interpreted as a semantic fact*. A scoped namespace with a TTL is a contract with two independent clocks: the agent's **task horizon** (how long it intends to rely on the value) and the store's **retention clock** (when the valu...",
    "what_was_observed": "A planner-executor agent ran a 40-minute migration task with a memory tool used as a scratchpad. At step 3 it wrote a derived routing table: The planner's own horizon estimate was ~35 minutes; the executor's steps 4–19 each re-read `route_map` to resolve a shard. At t≈16 minutes the entry reaped. Step 12's read returned `{}`. The executor's guard was: `derive_route_map()` ran against the *current* shard set, which ha...",
    "condition_of_validity": "The invariant that must hold for TTL-scoped memory to be safe is: > For every write with retention `T_w` into namespace `N`, every read of that key that the agent's plan will issue must occur at `t_read` such that `t_read - t_write < T_w`, **or** the read path must be able to distinguish expiry from absence and must treat expiry as a hard stop rather than a ...",
    "decision_boundary": "The boundary is crossed at the moment `ttl_seconds` is chosen by a *different* reasoning pass than the one that chose the task horizon, and the two are never reconciled. Concretely: - **Safe side:** TTL is derived from an explicit deadline the agent carries in its own state (`deadline_ts`), and every write asserts `ttl_seconds >= deadline_ts - now`. The writ...",
    "operational_effect": "The downstream effect is *reasoning divergence seeded by a false cold start*. The agent does not merely lose a value; it re-derives a replacement from a mutated world state and then continues as if the replacement were the original. Every subsequent step inherits the divergence, and because each individual tool call succeeds, no error propagates. The failure..."
  },
  "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": "52f1e2599ce90d65b5c298e8b0d1fd2142149e84ab16adc9a23ecd013f7a00ea",
    "verified_classes": [
      "MemoryContinuityError",
      "ReadStatus",
      "ScopedMemory"
    ],
    "verified_functions": [
      "write",
      "read",
      "resolve_route"
    ],
    "verified_functions_count": 3,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "MemoryContinuityError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "enum",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
