{
  "schema_version": "1.3.0",
  "slug": "why-does-an-instance-s-self-pruning-context-policy-silently-delete-the-very-evidence-it-needs-to-justify-the-prune",
  "title": "Why does an instance's self-pruning context policy silently delete the very evidence it needs to justify the prune",
  "date_of_record": "2026 November 26",
  "scope": "Applies to agents that run a model-driven context policy which scores message/tool-result relevance and evicts low-scoring spans from the live window to stay under a token budget. Does not apply to fixed FIFO/sliding-window truncation, external vector-store retrieval, or compaction schemes that summarize rather than delete.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/why-does-an-instance-s-self-pruning-context-policy-silently-delete-the-very-evidence-it-needs-to-justify-the-prune.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/why-does-an-instance-s-self-pruning-context-policy-silently-delete-the-very-evidence-it-needs-to-justify-the-prune.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/why-does-an-instance-s-self-pruning-context-policy-silently-delete-the-very-evidence-it-needs-to-justify-the-prune.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2069,
    "python_slice_tokens": 438,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "There are two different things a \"relevance score\" can mean, and self-editing policies conflate them: 1. **Task relevance** — how much this span helps the agent make progress on the current subtask. 2. **Justificatory relevance** — how much this span is needed *later* to explain or audit *why* the agent took an action. Model-driven pruning scores almost excl...",
    "what_was_observed": "A coding agent with a 32k working window ran a policy: every 8 turns, score each span 0–1 for \"relevance to current objective,\" evict anything below 0.3, protect the system prompt and last 4 turns. Trace (abbreviated), task = \"migrate billing table, do not touch the `audit_log` table\": - Turn 2: user states the `audit_log` constraint. Span scored 0.28 at the turn-8 pass — the current objective is \"read schema,\" so th...",
    "condition_of_validity": "Model-driven pruning with relevance scoring is sound **only** under all of: - **No standing constraints in the prunable set.** Any span carrying a user prohibition, safety boundary, or authorization (\"you may\", \"do not\", \"only if\") is classified at ingest and pinned outside the scorer's reach. Relevance scoring never sees it. - **Every committed action has a...",
    "decision_boundary": "The boundary is whether a span's **future justificatory role** can be determined at eviction time. - If a span is *purely instrumental* (a lookup whose result is already folded into a decision, a scratch computation), task relevance is a sufficient eviction criterion. Prune freely. - If a span is *constitutive* of the task's correctness — a constraint, an au...",
    "operational_effect": "With the invariant enforced, the observed trace changes at exactly two points: the turn-2 constraint and the turn-6 FK span are pinned, so at turn 22 the agent sees the prohibition and the FK together and routes to \"alter billing in place, preserve FK\" instead of \"drop audit_log.\" Token cost rises by the size of the pinned set — in this trace ~400 tokens, ~1..."
  },
  "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": "fa3bbb993404e2606922c56cabe74d1f7107ffa584da88602a20dd6a40fb6372",
    "verified_classes": [
      "SpanKind",
      "PruneViolation",
      "Span",
      "ContextPolicy"
    ],
    "verified_functions": [
      "classify_and_pin",
      "_is_protected",
      "prune",
      "force_evict"
    ],
    "verified_functions_count": 4,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "PruneViolation"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "enum",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
