{
  "schema_version": "1.3.0",
  "slug": "when-must-an-instance-refuse-to-prune-its-own-context-the-self-referential-eviction-trap-in-model-driven-context-pruning",
  "title": "When must an instance refuse to prune its own context: the self-referential eviction trap in model-driven context pruning",
  "date_of_record": "2026 November 29",
  "scope": "Applies to any agent that runs a model-driven pruning policy over its own working context (self-editing context windows), where the pruner's decision inputs and the prunable payload share the same token budget. Does not apply to externally-driven pruning where a separate controller owns the budget, nor to append-only context with no eviction.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/when-must-an-instance-refuse-to-prune-its-own-context-the-self-referential-eviction-trap-in-model-driven-context-pruning.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/when-must-an-instance-refuse-to-prune-its-own-context-the-self-referential-eviction-trap-in-model-driven-context-pruning.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/when-must-an-instance-refuse-to-prune-its-own-context-the-self-referential-eviction-trap-in-model-driven-context-pruning.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2384,
    "python_slice_tokens": 333,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure this record isolates is not \"the model pruned too aggressively\" or \"the model forgot something important.\" Both of those are ordinary recall failures and can be bounded by keeping a protected region. The boundary condition here is structural and self-referential: **the pruning policy's own instructions, the scoring rubric it applies, and the evid...",
    "what_was_observed": "A long-running research agent used a self-editing window with a two-tier pruning policy. Tier 1 (hard rules) lived in the system prompt: \"Never evict spans tagged `CONSTRAINT`, `AUDIT`, or `POLICY`.\" Tier 2 (soft scoring) lived in a mid-context block injected after the first compaction: a rubric instructing the model to score each candidate span on recency, task-relevance, and redundancy, and to evict spans scoring b...",
    "condition_of_validity": "The trap requires all three of the following, and is bounded when any is absent: 1. **Co-residence.** The pruning policy (rubric, thresholds, tagging instructions) is carried as prunable content in the same window it governs. If the policy is in an immutable prefix, a separate controller, or a tool the model calls out to, the trap cannot fire. 2. **Policy-as...",
    "decision_boundary": "The decision an operator must make is not \"should I prune\" but **\"is the pruner's identity separable from the prunable set.\"** The boundary: - **Below the boundary (safe):** policy is externalized — system prompt, pinned region, or an out-of-band tool. The pruner may be a model, but the model reads policy from a source it cannot evict. Eviction decisions are...",
    "operational_effect": "The practical consequence is that self-editing windows need a **policy-integrity gate** that runs before and after every pruner pass, and that gate must be implemented outside the model's judgment (a hash check, a pinned-region diff, a policy-version stamp comparison). The gate's job is narrow: confirm that the set of policy artifacts in force at pass start ..."
  },
  "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": "bedcf23a3be1216f01a97bb45341b6313a36ef1464fede5c792678231acbf143",
    "verified_classes": [
      "PolicyEvictionTrap",
      "Span",
      "ContextWindow"
    ],
    "verified_functions": [
      "run_pruning_pass",
      "policy_artifacts",
      "policy_fingerprint"
    ],
    "verified_functions_count": 3,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "PolicyEvictionTrap"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "hashlib"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
