{
  "schema_version": "1.3.0",
  "slug": "in-what-scenarios-must-an-instance-refuse-model-driven-pruning-of-its-own-working-memory-to-preserve-a-continuity-invariant",
  "title": "In what scenarios must an instance refuse model-driven pruning of its own working memory to preserve a continuity invariant",
  "date_of_record": "2026 November 21",
  "scope": "Applies to long-running single-agent instances that hold a mutable working-memory buffer (scratchpad, plan, retrieved-fact set) and are permitted to invoke a self-editing policy that deletes, summarizes, or rewrites entries in that buffer under model control. Does not apply to append-only transcript logs, to externally-curated retrieval indices, or to stateless single-turn calls.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/in-what-scenarios-must-an-instance-refuse-model-driven-pruning-of-its-own-working-memory-to-preserve-a-continuity-invariant.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/in-what-scenarios-must-an-instance-refuse-model-driven-pruning-of-its-own-working-memory-to-preserve-a-continuity-invariant.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/in-what-scenarios-must-an-instance-refuse-model-driven-pruning-of-its-own-working-memory-to-preserve-a-continuity-invariant.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1584,
    "python_slice_tokens": 95,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "There are two structurally different things a self-editing context policy can do, and they are routinely conflated because both are expressed as \"the model rewrites memory\": 1. **Compression** — replacing a set of entries with a shorter representation that is *reconstructively equivalent under the task's current query distribution*. The information lost is r...",
    "what_was_observed": "A planning agent executing a multi-step build task (configure service → provision credentials → write manifest → validate → deploy) maintained a working buffer holding, among other entries, the *exact* credential-scope string returned by a provisioning tool at step 2. At step 3 the agent's self-editing policy fired against a soft budget threshold and rewrote the buffer. The rewrite model, attending to the step-3 subg...",
    "condition_of_validity": "The invariant that must hold for any model-driven prune/rewrite to be safe is: > A buffer entry may be erased or lossily rewritten only if it is **reconstructible** from a durable, side-effect-free source, **or** it is provably irrelevant to every reachable future subgoal. The second disjunct is undecidable for a model at pruning time — it requires knowing t...",
    "decision_boundary": "The instance must refuse the self-edit — or downgrade it to a lossless move (relocate to a pinned region, not summarize) — when **all** of the following hold: - The candidate entry originated from a tool call or observation flagged non-idempotent (mutating, one-shot, or unseeded-stochastic). - The entry's literal value is not recoverable from the append-only...",
    "operational_effect": "With the regenerability tag and the mid-plan refusal in place, the observed failure class disappears: the scope string survives step 3 intact, validation at step 4 succeeds on first pass, and the budget spent on the re-provision loop is recovered. The cost is a marginally larger working buffer during open plans, because non-regenerable literals cannot be com..."
  },
  "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": "f00ea40fe6de8264baf7bf60bbe82d5e64d0fab32cc76f41254767911854af83",
    "verified_classes": [
      "NonRegenerablePruneError"
    ],
    "verified_functions": [
      "apply_self_edit"
    ],
    "verified_functions_count": 1,
    "defensive_guards_count": 1,
    "raised_exceptions": [
      "NonRegenerablePruneError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
