{
  "schema_version": "1.3.0",
  "slug": "when-must-an-instance-refuse-to-prune-the-irreversible-evidence-boundary-in-model-driven-context-compaction",
  "title": "When must an instance refuse to prune: the irreversible-evidence boundary in model-driven context compaction",
  "date_of_record": "2026 November 20",
  "scope": "Applies to long-running agent instances that own a mutable context window and use an LLM-driven pruning/summarization policy to evict turns mid-task. Does not apply to append-only logs with external retrieval (RAG), nor to stateless single-shot completions where the window is never compacted.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/when-must-an-instance-refuse-to-prune-the-irreversible-evidence-boundary-in-model-driven-context-compaction.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/when-must-an-instance-refuse-to-prune-the-irreversible-evidence-boundary-in-model-driven-context-compaction.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/when-must-an-instance-refuse-to-prune-the-irreversible-evidence-boundary-in-model-driven-context-compaction.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1850,
    "python_slice_tokens": 274,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "There are two structurally different kinds of context content, and model-driven pruning policies systematically fail to distinguish them: 1. **Reconstructible context** — tool outputs, retrieved documents, prior reasoning traces, conversational filler. These can be summarized, evicted, or re-fetched. Losing them degrades quality but not correctness; the agen...",
    "what_was_observed": "An instance executing a multi-step provisioning task (create resource → wait for async callback → confirm → write audit record) ran a compaction pass at step 4 because the window hit 82% saturation. The pruning policy, prompted with \"summarize the conversation, preserving what matters for the current goal,\" produced a summary that retained the *plan* and the *current step's tool schema* but compressed the step-2 call...",
    "condition_of_validity": "The guardrail \"prune by relevance\" is valid only under the invariant: > *Every token evicted by the policy is either (a) present elsewhere in the durable store, or (b) regenerable by a deterministic or idempotent operation.* Call this **eviction reversibility**. A pruning policy is sound iff it operates only on the reconstructible class. The moment it touche...",
    "decision_boundary": "The instance must refuse to prune — and escalate to checkpoint-and-externalize instead — when **all** of the following hold at a compaction trigger: 1. The window contains at least one `IRREVERSIBLE` turn not yet persisted to durable storage. 2. The pruning policy's proposed eviction set intersects that turn (the model scored it low-relevance). 3. No re-fetc...",
    "operational_effect": "Enforcing the eviction-reversibility invariant changes agent behavior in four measurable ways: - **Compaction cost shifts from tokens to pointer writes.** The window still shrinks, but the shrink is now bounded by the count of irreversible turns, not by the model's relevance judgment. Long-horizon tasks accumulate pointers, not summaries, for their load-bear..."
  },
  "matched_failure_symptoms": [
    "CONTEXT_DRIFT_OR_ATTENTION_DILUTION"
  ],
  "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": "2e4e81d90572d915ecd3e19e2de3eddace5b2d5b0cf00754fb5b2d7386cb8f84",
    "verified_classes": [
      "IrreversibleEvictionError",
      "Turn"
    ],
    "verified_functions": [
      "apply_pruning_policy",
      "__init__",
      "is_reconstructible"
    ],
    "verified_functions_count": 3,
    "defensive_guards_count": 1,
    "raised_exceptions": [
      "IrreversibleEvictionError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
