{
  "schema_version": "1.3.0",
  "slug": "under-what-conditions-must-an-instance-refuse-to-prune-a-context-segment-whose-relevance-score-has-decayed-but-whose-referent-is-still-live-in-the-too",
  "title": "Under what conditions must an instance refuse to prune a context segment whose relevance score has decayed but whose referent is still live in the tool-call ledger",
  "date_of_record": "2026 November 29",
  "scope": "Applies to agents that self-edit their own context window via model-scored relevance eviction (LLM-as-pruner, salience ranking, or recency-weighted scoring) while holding an open, multi-turn tool-call ledger. Does not apply to fixed-window truncation policies, external retrieval stores, or single-turn invocations with no persistent tool state.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/under-what-conditions-must-an-instance-refuse-to-prune-a-context-segment-whose-relevance-score-has-decayed-but-whose-referent-is-still-live-in-the-too.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/under-what-conditions-must-an-instance-refuse-to-prune-a-context-segment-whose-relevance-score-has-decayed-but-whose-referent-is-still-live-in-the-too.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/under-what-conditions-must-an-instance-refuse-to-prune-a-context-segment-whose-relevance-score-has-decayed-but-whose-referent-is-still-live-in-the-too.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1777,
    "python_slice_tokens": 220,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "A relevance score is a *synchronous* judgment: at pruning time, the scorer asks \"is this segment still useful to the current reasoning trajectory?\" A tool-call ledger is an *asynchronous* contract: a resource created at step *k* (a file handle, a transaction ID, a spawned process, a registered callback) remains live at step *k+n* regardless of whether any se...",
    "what_was_observed": "A file-editing agent running a self-pruning loop (score threshold 0.35, evict below threshold, summarize-and-collapse above 0.85) executed the following trace over 14 turns: 1. Turn 2: `open(path=\"/tmp/build/artifact.bin\", mode=\"wb\")` → returns handle `H7`. Segment scored 0.91 (highly relevant, active work). 2. Turns 3–9: writes streamed through `H7`. The original `open()` segment's score decays monotonically as the ...",
    "condition_of_validity": "Pruning a decayed segment is safe **if and only if** the segment contains no identifier that is (a) present in the tool-call ledger as a live referent and (b) not re-derivable from any surviving segment or from a ledger query the agent is guaranteed to issue. Formally, let `L` be the set of live referents in the ledger at pruning time, and let `M(s)` be the ...",
    "decision_boundary": "The boundary between \"prune\" and \"pin\" is drawn by the ledger, not the scorer, and the agent must consult the ledger *before* scoring, not after: - **Prune** when the segment's referents are all retired (handle closed, transaction committed, process reaped) or when the segment mentions no ledger identifiers at all. - **Pin** when any mentioned identifier is ...",
    "operational_effect": "With ledger-keyed pinning in place, the failure class disappears at the cost of a bounded number of pinned segments (bounded by concurrent live referents, typically small). The token savings from pruning drop modestly — the pinned stubs are cheap — while recovery-token expenditure and durability incidents go to zero in the observed workload. The deeper effec..."
  },
  "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": "0b5cc4413e02204c90e8f1924a2309528e78da37e0d45225e8ab75d94b82dfde",
    "verified_classes": [
      "LiveReferentEvictionError"
    ],
    "verified_functions": [
      "prune_segment",
      "collapse_segment"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "LiveReferentEvictionError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
