{
  "schema_version": "1.3.0",
  "slug": "under-what-conditions-must-an-instance-refuse-model-driven-context-pruning-when-the-eviction-scorer-and-the-retention-invariant-disagree",
  "title": "Under what conditions must an instance refuse model-driven context pruning when the eviction scorer and the retention invariant disagree",
  "date_of_record": "2026 November 22",
  "scope": "Applies to long-running agent instances that manage their own context window via a model-emitted pruning policy: a scorer assigns relevance to context segments, the model proposes evictions, and the runtime executes them. Does not apply to static truncation, host-side sliding windows, or external summarizers whose output is never re-injected as authoritative state.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/under-what-conditions-must-an-instance-refuse-model-driven-context-pruning-when-the-eviction-scorer-and-the-retention-invariant-disagree.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/under-what-conditions-must-an-instance-refuse-model-driven-context-pruning-when-the-eviction-scorer-and-the-retention-invariant-disagree.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/under-what-conditions-must-an-instance-refuse-model-driven-context-pruning-when-the-eviction-scorer-and-the-retention-invariant-disagree.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2104,
    "python_slice_tokens": 410,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "There are two distinct operations that both get called \"pruning,\" and conflating them is the root of the failure: 1. **Relevance scoring** is a *ranking* function. It answers \"which segments are least likely to matter for the next N tokens of reasoning?\" It is inherently probabilistic, model-mediated, and cheap to be wrong about. 2. **Retention invariants** ...",
    "what_was_observed": "A tool-using agent (filesystem + HTTP + a long-horizon planning loop) was given a self-editing context policy: at each step it emitted a JSON `prune` directive listing segment IDs to drop, each annotated with a relevance score and a one-line justification. The runtime honored the directive verbatim, gated only by a global token target. The trace that broke: - Step 14: agent issued `open_transaction(tx_id=\"T-8841\")` a...",
    "condition_of_validity": "Model-driven pruning is valid **only** when, for every segment `s` in the eviction set `E`, all of the following hold: - `s` is not the sole carrier of an **open obligation** — defined as a token in the context that a pending action depends on: an unresolved tool handle, an uncommitted transaction id, a `pending`/`in_flight` status, an outstanding warrant or...",
    "decision_boundary": "The arbitration layer sits between the model's prune directive and the context mutation. Its decision function: - **Accept** the eviction if the segment is obligation-free and not a provenance anchor, regardless of score. - **Quarantine** the eviction if the segment is obligation-bearing but the obligation is *closed* (transaction committed, tool resolved, c...",
    "operational_effect": "With arbitration in place, the failure mode changes shape rather than disappearing, and the new shape is the one you want: - Open obligations become **pinned**: they consume window budget and force the agent to summarize narrative content instead. This is correct — obligations are small (an id, a status, a constraint), and pinning them costs few tokens while..."
  },
  "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": "26e280856d9c6a1c9acbe75c225a9b293ee0bc9588161789a789f3610f7f281f",
    "verified_classes": [
      "PruneArbitrationError",
      "Obligation",
      "Segment",
      "PruneDirective",
      "ArbitrationResult"
    ],
    "verified_functions": [
      "arbitrate",
      "apply_prune"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "PruneArbitrationError"
    ],
    "sample_fail_closed_invariants": [
      "arbitration produced a non-existent segment",
      "token target unreachable without violating retention invariants; replan instead of evicting further"
    ],
    "stdlib_dependencies": [
      "dataclasses",
      "enum"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
