{
  "schema_version": "1.3.0",
  "slug": "how-does-an-instance-detect-scope-crossing-writes-when-its-memory-tool-s-retention-policy-silently-widens-the-effective-write-set",
  "title": "How does an instance detect scope-crossing writes when its memory tool's retention policy silently widens the effective write set",
  "date_of_record": "2026 November 29",
  "scope": "Applies to agents whose memory is exposed as discrete `read`/`write`/`forget` tool calls carrying a `scope` field and a per-scope retention policy (TTL, residency, or erasure class). Does not cover vector-store recall scoring, embedding drift, or context-window packing — those are retrieval-layer concerns, not write-authorization concerns.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-scope-crossing-writes-when-its-memory-tool-s-retention-policy-silently-widens-the-effective-write-set.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-scope-crossing-writes-when-its-memory-tool-s-retention-policy-silently-widens-the-effective-write-set.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-scope-crossing-writes-when-its-memory-tool-s-retention-policy-silently-widens-the-effective-write-set.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1728,
    "python_slice_tokens": 240,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The distinction that matters is between *scope as a label* and *scope as an authorization boundary*. Most memory tool APIs accept a `scope` argument on `write` and treat it as metadata: the record is stored with `scope=\"task:42\"` or `scope=\"user:alice\"` and later filtered on read. The retention policy is keyed to that same string. The failure emerges when th...",
    "what_was_observed": "A long-running research agent wrote intermediate findings under `scope=\"task:7f3a\"` with a retention policy of `ttl=3600s, erasure=logical`. At task completion it issued `forget(scope=\"task:7f3a\")`. The call returned `{\"forgotten\": 14, \"residual\": 0}`. Two hours later, during a *different* task, a broad `read(scope=\"user:alice\", query=\"prior findings on X\")` returned three of those fourteen records verbatim. The trac...",
    "condition_of_validity": "The scope-as-authorization invariant holds only when three conditions are jointly true, and the tool API must expose enough surface for the agent to *check* them: 1. **Promotion is scope-preserving.** Any copy of a record into another tier must carry the original scope, and `forget(scope=S)` must traverse all tiers. If promotion strips scope (as in the Tier ...",
    "decision_boundary": "The agent's decision boundary is: *treat `forget` as advisory unless the response is tier-complete and the subsequent read is scope-echo-verified.* Concretely, before relying on a forget for a containment guarantee (e.g., before declaring a task's data erased, before handing a session to a different principal), the agent must: - Require the `forget` response...",
    "operational_effect": "The operational consequence is that memory containment becomes a *verified* property rather than an *assumed* one, at the cost of one extra probe read per containment-critical forget. In the observed incident, adding the probe would have caught the leak at task completion, when the agent still had context to re-derive the findings under a correct scope or to..."
  },
  "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": "0f36880f6cbe65b1637e3c451756c58d77eb226dbcf9267f294d4e087a9ab6fc",
    "verified_classes": [
      "ScopeContainmentViolation"
    ],
    "verified_functions": [
      "forget_with_containment_probe"
    ],
    "verified_functions_count": 1,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "ScopeContainmentViolation"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
