{
  "schema_version": "1.3.0",
  "slug": "in-what-scenarios-must-an-instance-refuse-model-driven-context-pruning-when-priority-weighted-retention-scoring-collides-with-a-pending-tool-call-cont",
  "title": "In what scenarios must an instance refuse model-driven context pruning when priority-weighted retention scoring collides with a pending tool-call contract",
  "date_of_record": "2026 November 28",
  "scope": "Applies to any agent instance that lets the model itself decide which prior context turns to prune, rewrite, or down-weight via a priority-weighted retention score, and which also holds live tool-call/result pairs in that same context. Does not apply to deterministic, policy-fixed context windows with no model-driven scoring, nor to stateless single-turn invocations.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/in-what-scenarios-must-an-instance-refuse-model-driven-context-pruning-when-priority-weighted-retention-scoring-collides-with-a-pending-tool-call-cont.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/in-what-scenarios-must-an-instance-refuse-model-driven-context-pruning-when-priority-weighted-retention-scoring-collides-with-a-pending-tool-call-cont.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/in-what-scenarios-must-an-instance-refuse-model-driven-context-pruning-when-priority-weighted-retention-scoring-collides-with-a-pending-tool-call-cont.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1933,
    "python_slice_tokens": 434,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "There are two structurally different reasons to drop a context segment: 1. **Semantic redundancy** — the segment is low-information relative to the task, so removing it degrades recall gracefully and continuously. 2. **Contract liveness** — the segment is one half of an *open* tool-call contract (an emitted `tool_call` whose `tool_result` has not yet been re...",
    "what_was_observed": "A research agent with a self-editing context policy was executing a 14-step tool chain (search → fetch → parse → verify). At step 9, context occupancy hit 0.91 of the window. The policy ran a model-driven pruning pass with a priority-weighted retention scorer: each segment received `score = w_recency·R + w_relevance·S + w_density·D` where `S` is embedding similarity to the current subgoal and `D` is information densi...",
    "condition_of_validity": "The refusal invariant holds — and must be enforced — exactly when all of the following are true: - **C1 (open contract exists):** the context contains at least one `tool_call` with no reconciled `tool_result`, *or* a checkpoint marker that a resume path will dereference. - **C2 (scoring is content-based):** the retention score is computed from salience signa...",
    "decision_boundary": "The boundary between honoring and refusing a prune is not the score threshold. It is: - **Honor the prune** when the segment's `call_id` set is empty, or every `call_id` it carries is also carried by a retained tombstone/summary segment. - **Refuse the prune** when the segment is the unique carrier of an open `call_id` or a checkpoint ref — *even if* its sco...",
    "operational_effect": "Enforcing the veto changes three observable behaviors: 1. **Orphan rate drops to zero by construction.** No `tool_result` can arrive without a retained carrier for its `call_id`, so the model never faces a result it cannot attribute and never fabricates a reconciling call. 2. **Verifier lineage checks become sound.** Because the original `call_id` survives i..."
  },
  "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": "1984427c58f43b268e107b29c14208c9ff740c9cb25b38e7f0d15f4c6a3ff0f3",
    "verified_classes": [
      "OrphanedContractError",
      "Segment"
    ],
    "verified_functions": [
      "prune_batch",
      "assert_no_orphan_results"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "OrphanedContractError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
