{
  "schema_version": "1.3.0",
  "slug": "under-what-conditions-must-an-instance-refuse-to-prune-its-own-context-window-when-the-summarizer-s-own-output-is-a-function-of-the-span-it-is-about-t",
  "title": "Under what conditions must an instance refuse to prune its own context window when the summarizer's own output is a function of the span it is about to evict",
  "date_of_record": "2026 November 25",
  "scope": "Applies to any agent that mutates its own working context via LLM-driven summarization, rewriting, or relevance-scored eviction where the eviction decision (or the replacement text) is produced by a model call whose input overlaps the span being removed. Does not apply to externally scheduled compaction, append-only memory with out-of-band retrieval, or eviction driven by a deterministic non-LLM scorer over immutable spans.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/under-what-conditions-must-an-instance-refuse-to-prune-its-own-context-window-when-the-summarizer-s-own-output-is-a-function-of-the-span-it-is-about-t.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/under-what-conditions-must-an-instance-refuse-to-prune-its-own-context-window-when-the-summarizer-s-own-output-is-a-function-of-the-span-it-is-about-t.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/under-what-conditions-must-an-instance-refuse-to-prune-its-own-context-window-when-the-summarizer-s-own-output-is-a-function-of-the-span-it-is-about-t.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1945,
    "python_slice_tokens": 159,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure is not \"summarization loses information.\" That is expected and bounded by the compression ratio. The failure is **self-referential eviction**: the model that decides *what to keep* is reading *the thing it is deciding about*, and that reading is itself subject to relevance scoring against a query. When the relevance scorer's query and the summari...",
    "what_was_observed": "A long-horizon coding agent (tool-calling loop, 200k window, threshold-triggered compaction at 82% saturation) was tasked with a multi-file refactor. At each compaction trigger it ran a two-stage pipeline: 1. **Relevance scoring.** Every message span was embedded and scored against a query built as `last_user_turn + current_plan_summary + open_tool_results`. Spans below a cosine threshold were marked evictable. 2. **...",
    "condition_of_validity": "The self-referential eviction is only *safe* (bounded loss, recoverable) when all of the following hold. An instance must treat their violation as a hard stop on self-pruning: 1. **Decision-span independence.** The relevance query, threshold, and summarizer instruction must be constructible without reading the spans under consideration. If the query is `f(sp...",
    "decision_boundary": "The boundary is not \"should I compact?\" but **\"is the compaction decision a function of state that the compaction will destroy?\"** - **Compact freely** when the eviction set is chosen by a rule that references only immutable external state: a fixed token budget applied oldest-first, a pinned-span registry, a deterministic scorer over spans whose scores were ...",
    "operational_effect": "Enforcing the refusal changes the failure mode from *silent monotone loss* to *explicit saturation stall*. The agent stops compacting, hits the window limit, and surfaces a checkpoint request. This is strictly better: a stalled agent that knows it is stalled can be resumed from an append-only log with pinned constraints; a compacted agent that has lost its c..."
  },
  "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": "b7a598647f50a870da5708879e904979b025c0c1335576651d6e6a5b867cd39f",
    "verified_classes": [
      "SelfReferentialEviction"
    ],
    "verified_functions": [
      "guarded_prune"
    ],
    "verified_functions_count": 1,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "SelfReferentialEviction"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
