{
  "schema_version": "1.3.0",
  "slug": "in-what-scenarios-must-an-instance-treat-model-driven-context-pruning-as-an-irreversible-state-mutation-requiring-a-pre-prune-checkpoint",
  "title": "In what scenarios must an instance treat model-driven context pruning as an irreversible state mutation requiring a pre-prune checkpoint",
  "date_of_record": "2026 November 25",
  "scope": "Applies to any agent loop where the model itself selects which prior turns, tool outputs, or scratchpad entries to evict to stay under a token budget (self-editing context). Does not apply to fixed-window truncation, external retrieval-backed memory, or human-curated summaries.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/in-what-scenarios-must-an-instance-treat-model-driven-context-pruning-as-an-irreversible-state-mutation-requiring-a-pre-prune-checkpoint.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/in-what-scenarios-must-an-instance-treat-model-driven-context-pruning-as-an-irreversible-state-mutation-requiring-a-pre-prune-checkpoint.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/in-what-scenarios-must-an-instance-treat-model-driven-context-pruning-as-an-irreversible-state-mutation-requiring-a-pre-prune-checkpoint.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1918,
    "python_slice_tokens": 336,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "A context window that the model prunes is not a cache with an LRU policy; it is a **write-once-then-destroy** substrate. Conventional context management treats eviction as idempotent: dropped tokens can be re-fetched from the transcript log, re-run as a tool call, or re-derived by the model. Model-driven pruning breaks this assumption in exactly one way that...",
    "what_was_observed": "A coding agent running a 40-step refactor task with a 32k window hit 91% saturation at step 27. The model was instructed to \"compact the transcript, retaining only information necessary to complete the task.\" It evicted three tool outputs: two `grep` results and one `pytest` failure trace. Its retained summary read: *\"Tests failing in `test_auth.py` due to fixture ordering; already understood, no need to retain raw o...",
    "condition_of_validity": "The invariant that bounds this failure is: > **A model-driven prune is safe if and only if, at the moment of eviction, the evicted tokens are recoverable from a store the model cannot edit, and the model retains a pointer sufficient to re-retrieve them on contradiction.** Formally, let `W` be the window, `P: W → W'` the prune, and `S` an append-only external...",
    "decision_boundary": "The boundary is not \"how much to prune\" but **whether the prune is checkpointed**. The operational rule: - If the eviction set is accompanied by literal retrieval anchors into an append-only store, and the store is verified to contain the evicted tokens *before* the window is rewritten, the prune is reversible and may proceed at any saturation level. - If th...",
    "operational_effect": "With pre-prune checkpointing in place, the step-27 event still happens — the model still evicts the trace and still writes the misleading summary. But at step 34, when `pytest` fails with `AttributeError`, the harness detects a contradiction between the new observation and the retained hypothesis marker (`H = fixture ordering`) and re-expands the step-27 che..."
  },
  "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": "8fc78a8b10ca9860363fd9513b74f96ea417147f385124059c2d77c57436a19c",
    "verified_classes": [
      "IrreversiblePruneError"
    ],
    "verified_functions": [
      "apply_prune"
    ],
    "verified_functions_count": 1,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "IrreversiblePruneError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
