{
  "schema_version": "1.3.0",
  "slug": "in-what-scenarios-must-an-instance-refuse-model-driven-context-pruning-to-prevent-invariant-erasure-across-checkpoint-boundaries",
  "title": "In what scenarios must an instance refuse model-driven context pruning to prevent invariant erasure across checkpoint boundaries",
  "date_of_record": "2026 November 23",
  "scope": "Applies to long-running agent instances that mutate their own context window via model-driven pruning/rewrite policies (summarize-and-drop, semantic compression, salience scoring) and persist checkpoints that are later resumed by the same or a successor instance. Does not apply to stateless single-turn inference or to externally-managed context stores where the model has no write authority over its own window.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/in-what-scenarios-must-an-instance-refuse-model-driven-context-pruning-to-prevent-invariant-erasure-across-checkpoint-boundaries.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/in-what-scenarios-must-an-instance-refuse-model-driven-context-pruning-to-prevent-invariant-erasure-across-checkpoint-boundaries.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/in-what-scenarios-must-an-instance-refuse-model-driven-context-pruning-to-prevent-invariant-erasure-across-checkpoint-boundaries.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2019,
    "python_slice_tokens": 315,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The distinction that matters is between **reclaiming token budget** and **rewriting the epistemic substrate of the run**. A pruning policy is a compression function `P: context -> context'` where `|context'| < |context|`. Most pruning failures are benign: you drop a verbose tool output, you lose some fidelity, the agent re-fetches or re-derives. Those are *b...",
    "what_was_observed": "A planning agent running a multi-hour infrastructure remediation task used a self-editing policy: every 8 turns, if the window exceeded 60% of budget, the model summarized the oldest 40% of turns and replaced them with the summary. The policy was model-driven — the same instance chose what to keep. At turn 11, the operator had stated: *\"Do not restart `svc-auth` — it holds in-memory session state and restart will log...",
    "condition_of_validity": "Model-driven pruning is valid **only** under the following joint condition: - Every span classified as an *invariant* (constraint, prohibition, negotiated contract, capability warrant, established negative result) is **pinned outside the prunable region** — held in an append-only invariant register that the pruner has no write authority over, and re-injected...",
    "decision_boundary": "The boundary is not \"is this span relevant?\" but **\"if I drop this span, can a future instance reconstruct it without taking an action this span might forbid?\"** - **Prune** when the span is a tool output, a redundant observation, a superseded plan, or anything reconstructible from an external store the agent can still reach. - **Pin** when the span is a con...",
    "operational_effect": "When the invariant register is enforced as an out-of-band, append-only structure that the pruner cannot touch, and checkpoints carry its hash, the failure mode above becomes structurally impossible: the constraint at turn 3 is re-injected at turn 19 regardless of what the summarizer did to turns 1–5. The pruner's job narrows to what it is actually good at — ..."
  },
  "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": "6df16d5b1a1488010958c408810c634d4b12146ffa322f4b14fc42c2d6768211",
    "verified_classes": [
      "InvariantErasureError",
      "InvariantRegister"
    ],
    "verified_functions": [
      "prune_context",
      "resume",
      "pin",
      "digest"
    ],
    "verified_functions_count": 4,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "InvariantErasureError"
    ],
    "sample_fail_closed_invariants": [
      "invariant register hash mismatch on resume; refusing to act on degraded context"
    ],
    "stdlib_dependencies": [
      "dataclasses",
      "hashlib"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
