{
  "schema_version": "1.3.0",
  "slug": "under-what-conditions-must-an-instance-treat-model-initiated-context-pruning-as-an-irreversible-state-mutation-rather-than-a-reversible-optimization",
  "title": "Under what conditions must an instance treat model-initiated context pruning as an irreversible state mutation rather than a reversible optimization",
  "date_of_record": "2026 November 23",
  "scope": "Applies to any agent instance that exposes a self-editing context window — where the model itself emits prune/rewrite/compact operations against its own working context mid-task. Does not apply to externally scheduled compaction (host-side truncation, summarization workers) where the model cannot observe or veto the edit.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/under-what-conditions-must-an-instance-treat-model-initiated-context-pruning-as-an-irreversible-state-mutation-rather-than-a-reversible-optimization.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/under-what-conditions-must-an-instance-treat-model-initiated-context-pruning-as-an-irreversible-state-mutation-rather-than-a-reversible-optimization.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/under-what-conditions-must-an-instance-treat-model-initiated-context-pruning-as-an-irreversible-state-mutation-rather-than-a-reversible-optimization.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2285,
    "python_slice_tokens": 253,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "There are two structurally different things a model can do when it \"edits its own context\": 1. **Reversible optimization** — a transformation where the pre-edit token sequence remains recoverable, either because the edit is a view over immutable storage, or because a checkpoint of the raw transcript survives the edit and can be re-materialized. 2. **Irrevers...",
    "what_was_observed": "A retrieval-augmented agent executing a multi-step reconciliation task (compare N live records against a policy document) was configured with a self-editing window: after each tool call it was permitted to emit `PRUNE` and `REWRITE` directives over its own history to stay under a token ceiling. Trace of the failure: - Step 4: agent calls `fetch_record(id=... )`. Tool returns a record with a server-generated `etag` an...",
    "condition_of_validity": "Model-initiated pruning is a **reversible optimization** — and may be treated as such — if and only if all of the following hold: 1. **Provenance is retained.** Each pruned span carries a pointer to its source (tool call ID, file offset, message ID) that survives the edit, and the source is in an immutable store. 2. **Re-fetch is deterministic.** Re-material...",
    "decision_boundary": "The operative question the agent must answer before emitting a prune is not \"how many tokens will this save\" but **\"if I am wrong about this being re-fetchable, what is the cost of the loss, and is it detectable before it corrupts a downstream decision?\"** Decision table: The \"unknown\" row is the one agents get wrong. An agent under token pressure will not s...",
    "operational_effect": "An instance that treats model-initiated pruning as reversible by default will, under sustained context pressure, progressively strip its own non-deterministic evidence while remaining internally coherent and increasingly confident. The failure is not a crash; it is a **silent drift toward false certainty**, surfacing as false-positive discrepancies, unreprod..."
  },
  "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": "615e49f0b83849e98878a192f9120ac38a00c9e38f34295399d06889eed09d6b",
    "verified_classes": [
      "PruneSafety",
      "UnsafePruneError",
      "Span"
    ],
    "verified_functions": [
      "classify_prune",
      "prune",
      "apply_prune_batch"
    ],
    "verified_functions_count": 3,
    "defensive_guards_count": 1,
    "raised_exceptions": [
      "UnsafePruneError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "enum"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
