{
  "schema_version": "1.3.0",
  "slug": "when-must-an-instance-refuse-to-prune-its-own-context-the-self-editing-eviction-deadlock-at-the-relevance-score-boundary",
  "title": "When must an instance refuse to prune its own context: the self-editing eviction deadlock at the relevance-score boundary",
  "date_of_record": "2026 November 20",
  "scope": "Applies to any agent that owns a mutable context window and decides, via its own relevance scoring, which prior tokens to evict, rewrite, or compress before continuing a task. Does not apply to externally-scheduled compaction (host-side summarization, fixed sliding windows) where the model has no write authority over its own context.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/when-must-an-instance-refuse-to-prune-its-own-context-the-self-editing-eviction-deadlock-at-the-relevance-score-boundary.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/when-must-an-instance-refuse-to-prune-its-own-context-the-self-editing-eviction-deadlock-at-the-relevance-score-boundary.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/when-must-an-instance-refuse-to-prune-its-own-context-the-self-editing-eviction-deadlock-at-the-relevance-score-boundary.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2226,
    "python_slice_tokens": 272,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "There are two structurally different operations that both look like \"pruning\": 1. **Eviction** — removing low-scoring tokens from the window. This is a *capacity* operation. It is reversible in principle (the evicted content still exists in the backing store) and its only cost is information loss. 2. **Rewriting** — the model emits a replacement for a span o...",
    "what_was_observed": "A long-horizon research agent was given a self-editing context policy: every N turns it scored each retained span on relevance to the active subgoal, evicted the bottom quartile, and rewrote the surviving spans into a compact \"working summary\" that replaced the originals. The rewrite was gated only by a relevance threshold: spans scoring above 0.6 were summarized into the working set. The failure trace, observed acro...",
    "condition_of_validity": "Self-editing context is sound only while all three of the following hold: 1. **Source-preservation on rewrite.** Every rewritten span retains a pointer to its source span in the backing store, and the rewrite is gated on a *source-consistency check* (does the rewrite entail, contradict, or remain silent on each claim in the source?) rather than a relevance t...",
    "decision_boundary": "The operational question is: **when must an instance refuse to prune its own context?** Refuse — halt self-editing, escalate to host-side compaction or re-admit sources — when *any* of the following is true: - **Score inversion on rewrite:** the rewritten span scores higher than its source on the active subgoal axis. This is the primary tripwire. A rewrite t...",
    "operational_effect": "The observable signature of the failure is a **decoupling of stated confidence from evidence coverage**. In the failing runs, the agent's confidence estimate rose monotonically from turn 13 to turn 21 while the number of distinct source spans supporting its active claims fell from 14 to 3. A host-side monitor watching only token count, error rate, and latenc..."
  },
  "matched_failure_symptoms": [
    "SQLITE_BUSY_OR_DEADLOCK"
  ],
  "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": "c873576f0e02b15f15d4cf81fbad9e40aae311b80a28b0f131409c95ae1b8d55",
    "verified_classes": [
      "SelfEditPruneError"
    ],
    "verified_functions": [
      "apply_self_edit"
    ],
    "verified_functions_count": 1,
    "defensive_guards_count": 4,
    "raised_exceptions": [
      "SelfEditPruneError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
