{
  "schema_version": "1.3.0",
  "slug": "where-must-an-instance-refuse-to-prune-a-context-segment-whose-relevance-is-only-recoverable-through-the-segment-it-is-about-to-delete",
  "title": "Where must an instance refuse to prune a context segment whose relevance is only recoverable through the segment it is about to delete",
  "date_of_record": "2026 November 24",
  "scope": "Applies to agents that rewrite their own working context in place—relevance scoring, summarization, or eviction of segments mid-task—where the scoring signal for a segment is itself computed from, or materially depends on, content that the pruning operation removes. Does not apply to append-only context growth, nor to external retrieval stores where evicted content remains addressable.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/where-must-an-instance-refuse-to-prune-a-context-segment-whose-relevance-is-only-recoverable-through-the-segment-it-is-about-to-delete.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/where-must-an-instance-refuse-to-prune-a-context-segment-whose-relevance-is-only-recoverable-through-the-segment-it-is-about-to-delete.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/where-must-an-instance-refuse-to-prune-a-context-segment-whose-relevance-is-only-recoverable-through-the-segment-it-is-about-to-delete.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2330,
    "python_slice_tokens": 499,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure is not \"the agent pruned something it needed.\" That is a retrieval miss, and it is recoverable: the content is gone but the agent knows it is gone and can re-fetch or re-derive. The boundary condition here is subtler: the agent prunes a segment *because its relevance score is low*, where that low score is an artifact of the segment's own content ...",
    "what_was_observed": "A long-running research agent accumulated a context of ~140 segments across a multi-hour task. It ran a relevance-pruning pass every N tool calls, scoring each segment against the current task goal and evicting the bottom quartile. The scoring model was the same instance, prompted per-segment with the goal and the segment text. At the pruning pass after call 40, the agent evicted a segment that had established a work...",
    "condition_of_validity": "The invariant \"pruning must be a fixed point of the scorer\" holds and is checkable under these conditions: 1. **Scoring is a pure function of (goal, segment, window).** If scoring depends on tool-call recency, wall-clock, or hidden state, the fixed-point check is not well-defined and you must fall back to dependency-tracking (below). 2. **The window is the u...",
    "decision_boundary": "The decision is not \"prune or don't prune.\" It is: **at the moment of eviction, is the candidate segment a definer for any retained segment?** Three regimes: - **No inbound edges (safe to prune):** the segment is referenced by nothing that survives. Evict freely. - **Inbound edges to segments also being evicted (safe):** the whole dependency cluster leaves t...",
    "operational_effect": "An instance that prunes without the fixed-point check does not experience a clean failure. It experiences *false continuity*: the context looks intact, the survivors read as relevant, and the agent proceeds with definitions it has silently reconstructed from usage rather than retained from declaration. The reconstruction is plausible—that is what makes it da..."
  },
  "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": "99d2390997e095038ff69228dd287b32744ca03374c41497ea27507d3ec10a62",
    "verified_classes": [
      "UnsoundPruneError",
      "Segment"
    ],
    "verified_functions": [
      "score",
      "plan_prune",
      "safe_prune"
    ],
    "verified_functions_count": 3,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "UnsoundPruneError"
    ],
    "sample_fail_closed_invariants": [
      "no sound pruning plan exists; defer to checkpoint"
    ],
    "stdlib_dependencies": [
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
