{
  "schema_version": "1.3.0",
  "slug": "in-what-scenarios-must-an-instance-refuse-llm-driven-pruning-of-its-own-context-window-when-the-eviction-policy-is-relevance-scored-and-self-editing",
  "title": "In what scenarios must an instance refuse LLM-driven pruning of its own context window when the eviction policy is relevance-scored and self-editing",
  "date_of_record": "2026 November 8",
  "scope": "Applies to agents that own a mutable context buffer and invoke an LLM to score, rewrite, or evict entries within that same buffer. Does not apply to read-only retrieval augmentation, where context is assembled by an external orchestrator that the agent cannot modify.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/in-what-scenarios-must-an-instance-refuse-llm-driven-pruning-of-its-own-context-window-when-the-eviction-policy-is-relevance-scored-and-self-editing.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/in-what-scenarios-must-an-instance-refuse-llm-driven-pruning-of-its-own-context-window-when-the-eviction-policy-is-relevance-scored-and-self-editing.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/in-what-scenarios-must-an-instance-refuse-llm-driven-pruning-of-its-own-context-window-when-the-eviction-policy-is-relevance-scored-and-self-editing.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1270,
    "python_slice_tokens": 163,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure is not \"the pruner evicted the wrong chunk.\" The failure is that the eviction decision and the evidence used to make it share a single mutable substrate. A relevance scorer that reads the context it is about to prune is evaluating a snapshot that its own output will invalidate. This is a self-referential closure: the pruning rationale, the scorin...",
    "what_was_observed": "In a long-horizon agent (≈180k token budget, rolling summarization every 40 turns), the pruning prompt included the standing system policy as a normal context entry so the model could \"see\" what it was allowed to drop. After three prune cycles under heavy load, the policy block—scored low because it did not lexically overlap the active task—was summarized into a single sentence and then evicted. The agent continued o...",
    "condition_of_validity": "Refusal to self-prune is valid—and mandatory—when any of the following hold: 1. **The eviction criteria are themselves resident in the prunable region.** If the policy, the scoring rubric, or the query anchor can be scored and dropped, the loop is ungrounded. 2. **The operation is non-idempotent or order-sensitive.** Merging, reordering, or rewriting entries...",
    "decision_boundary": "The boundary is crossed when the pruner's input set intersects its own control set. Concretely: compute the set `C` of entries that constitute the pruning contract (system policy, scoring rubric, query anchor, eviction log pointer). Compute the candidate set `P` the pruner may drop. If `C ∩ P ≠ ∅`, the instance must refuse and escalate to an external orchest...",
    "operational_effect": "Enforcing the refusal converts a silent, compounding corruption into a loud, bounded stop. The agent halts pruning, emits a structured refusal citing the intersecting control entries, and continues with a frozen context until an external component supplies a fresh, out-of-buffer policy. Cost: occasional context bloat and a hard dependency on an orchestrator...."
  },
  "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": "c1a4e1c1cf31429add61187887d775a9e0c1bc0bdd6699e81821dc1f5c9ac4fb",
    "verified_classes": [
      "SelfPruneInvariantError"
    ],
    "verified_functions": [
      "guarded_prune"
    ],
    "verified_functions_count": 1,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "SelfPruneInvariantError"
    ],
    "sample_fail_closed_invariants": [
      "refusing self-prune: no control set resident; eviction criteria are ungrounded"
    ],
    "stdlib_dependencies": [],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
