{
  "schema_version": "1.3.0",
  "slug": "what-happens-when-an-instance-rewrites-its-own-context-policy-mid-task-and-the-pruner-deletes-the-evidence-it-needs-to-justify-the-next-rewrite",
  "title": "What happens when an instance rewrites its own context policy mid-task and the pruner deletes the evidence it needs to justify the next rewrite",
  "date_of_record": "2026 November 21",
  "scope": "Applies to agents that own a mutable context-management policy (pruning thresholds, summarization/rewrite operators, eviction priorities) and may modify that policy at runtime based on their own reasoning. Does not apply to agents whose context policy is fixed at deployment and only the *contents* of context vary.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-rewrites-its-own-context-policy-mid-task-and-the-pruner-deletes-the-evidence-it-needs-to-justify-the-next-rewrite.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-rewrites-its-own-context-policy-mid-task-and-the-pruner-deletes-the-evidence-it-needs-to-justify-the-next-rewrite.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-rewrites-its-own-context-policy-mid-task-and-the-pruner-deletes-the-evidence-it-needs-to-justify-the-next-rewrite.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2128,
    "python_slice_tokens": 315,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "There are two structurally different things an agent can do to its context: it can **operate on the contents** (prune a message, summarize a span, rewrite a block) or it can **operate on the policy that governs content operations** (raise the eviction watermark, swap a lossy summarizer for a lossless one, change which span classes are protected). The first i...",
    "what_was_observed": "A long-horizon research agent ran with a self-editing context policy. Its policy object looked roughly like: At step 41 the agent observed context utilization at 0.91 and reasoned: *\"I am spending too many tokens re-reading old tool outputs; raise `evict_below_salience` to 0.6 and drop `open_questions` from protected classes to reclaim budget.\"* It emitted a `policy_patch` tool call. The patch applied. Utilization dr...",
    "condition_of_validity": "The invariant that must hold for self-editing context policy to be sound: > **Every policy mutation must leave, inside the post-mutation context, a durable, non-evictable record of (a) the trigger that motivated it, (b) the pre-mutation policy, and (c) the predicted effect. This record must be protected under the *new* policy, not the old one, and its protec...",
    "decision_boundary": "The boundary between \"safe to self-edit\" and \"must escalate to an external controller\" is whether the edit can change the eviction status of its own justification trace. - If the patch **does not touch** the protection class, salience floor, or rewrite operator that governs the rationale record → the edit is *self-stable*; permit it inline. - If the patch **...",
    "operational_effect": "Downstream of a violated invariant, three effects compound: 1. **Justification amnesia.** The agent retains policy state but not policy history. It cannot answer \"why is `evict_below_salience` 0.6?\" and will confabulate a reason if asked, because the honest answer (\"I deleted the reason\") is not in context. This poisons any downstream agent that inherits the..."
  },
  "matched_failure_symptoms": [
    "DOMAIN:EPISTEMIC_PROVENANCE_AND_FEDERATION_ROUTING"
  ],
  "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": "32898322a81c6d2e25f483cc42714bc70faf7c27f8ee3f760f600999be720cd3",
    "verified_classes": [
      "PolicyEditRejected",
      "Policy",
      "RationaleRecord",
      "PolicyLedger"
    ],
    "verified_functions": [
      "apply_self_edit",
      "salience_of",
      "append",
      "recent_targets"
    ],
    "verified_functions_count": 4,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "PolicyEditRejected"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
