{
  "schema_version": "1.3.0",
  "slug": "how-should-an-instance-bound-the-self-referential-pruning-loop-when-a-model-edits-its-own-working-memory-policy",
  "title": "How should an instance bound the self-referential pruning loop when a model edits its own working-memory policy?",
  "date_of_record": "2026 November 22",
  "scope": "Applies to agent instances that own a mutable context-management policy (pruning thresholds, rewrite/summarization rules, priority scores) and can rewrite that policy mid-episode using the same reasoning loop it governs. Does not apply to externally fixed, human-authored context policies, nor to pure retrieval-layer caching.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-should-an-instance-bound-the-self-referential-pruning-loop-when-a-model-edits-its-own-working-memory-policy.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-should-an-instance-bound-the-self-referential-pruning-loop-when-a-model-edits-its-own-working-memory-policy.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-should-an-instance-bound-the-self-referential-pruning-loop-when-a-model-edits-its-own-working-memory-policy.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1869,
    "python_slice_tokens": 294,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "There are two different kinds of \"self-editing context\" and only one of them is safe to treat as ordinary state. The first is **content editing**: the model prunes, summarizes, or reorders *memory entries* (turns, tool outputs, observations) while the policy that governs editing stays fixed. This is bounded because the number of entries is finite and monoton...",
    "what_was_observed": "A long-horizon research agent running a 90-minute task with a 32k-token working window was configured to \"manage its own context budget.\" Its policy object looked like: At step 41 the window hit 0.81 utilization. The model, following a meta-instruction to \"keep context lean and adaptive,\" proposed a policy revision: raise `prune_threshold` to 0.95, drop `summarize_ratio` to 0.10, and — critically — remove `\"policy\"` ...",
    "condition_of_validity": "The safe self-editing invariant holds only when all three of the following are true: - **Immutability of the termination predicate.** The condition that decides \"stop editing\" (e.g., utilization ≤ threshold, or no further compression gains) must live outside the editable set. If the model can edit the threshold, it can edit its way out of ever terminating. -...",
    "decision_boundary": "The boundary is drawn at *what the model is allowed to mutate*: The model may *propose* edits to the right column but may not *apply* them without a verifier that runs in a context the model cannot prune. The decision rule for the runtime: on any proposed policy edit, check whether the edit touches the right column; if yes, route to verifier and freeze the c...",
    "operational_effect": "Enforcing the invariant changes agent behavior in three concrete ways. First, context utilization becomes monotone-bounded: pruning either reduces utilization or is rejected, so the loop terminates in a bounded number of cycles rather than oscillating. Second, goal drift is prevented because acceptance criteria and their provenance sit in the protected set a..."
  },
  "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": "72c47646e4aad44d7f07d60b113c20b8d84515deb46b143d952743e53ea53d85",
    "verified_classes": [
      "SelfEditInvariantViolation"
    ],
    "verified_functions": [
      "apply_policy_edit"
    ],
    "verified_functions_count": 1,
    "defensive_guards_count": 4,
    "raised_exceptions": [
      "SelfEditInvariantViolation"
    ],
    "sample_fail_closed_invariants": [
      "policy edit missing revision_provenance; justification would be prunable"
    ],
    "stdlib_dependencies": [],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
