{
  "schema_version": "1.3.0",
  "slug": "in-what-scenarios-must-an-instance-refuse-to-prune-a-salience-weighted-context-window-because-the-rewrite-would-orphan-an-unverified-tool-call-premise",
  "title": "In what scenarios must an instance refuse to prune a salience-weighted context window because the rewrite would orphan an unverified tool-call premise",
  "date_of_record": "2026 November 30",
  "scope": "Applies to any agent that maintains a mutable, salience-scored context window and performs in-place rewriting/pruning between reasoning steps (self-editing context). Does not apply to append-only logs, externalized vector memory, or windows compacted only at task boundaries with a full re-derivation pass.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/in-what-scenarios-must-an-instance-refuse-to-prune-a-salience-weighted-context-window-because-the-rewrite-would-orphan-an-unverified-tool-call-premise.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/in-what-scenarios-must-an-instance-refuse-to-prune-a-salience-weighted-context-window-because-the-rewrite-would-orphan-an-unverified-tool-call-premise.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/in-what-scenarios-must-an-instance-refuse-to-prune-a-salience-weighted-context-window-because-the-rewrite-would-orphan-an-unverified-tool-call-premise.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2157,
    "python_slice_tokens": 337,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The distinction that matters is between *evicting tokens* and *evicting premises*. Salience-weighted pruning treats the context window as a budgeted set of scored spans: each span carries a salience weight, and when the window approaches saturation, the lowest-weight spans are dropped or rewritten to reclaim tokens. This is sound when a span is *self-contain...",
    "what_was_observed": "An agent executing a multi-step refund workflow saturated its 32k window at step 11 of 14. The self-editing policy triggered: it ranked spans by a composite of recency decay, embedding centrality, and token cost, then rewrote the bottom 20% into summaries. Among the pruned spans was the verbatim return of a `verify_account` tool call issued at step 3, whose result was `{\"verified\": false, \"reason\": \"KYC_PENDING\"}`. T...",
    "condition_of_validity": "Pruning a span is valid **iff** the span is dependency-closed: no live span in the window references it as a premise, *or* every referencing span has already been discharged (its result committed to an external store, or its branch terminated). Formally, for each candidate span `s`, the rewrite is admissible only when `dependents(s) ∩ live_spans = ∅` **and**...",
    "decision_boundary": "The decision boundary is between **compaction** (lossy rewrite of dependency-closed spans) and **deferral** (refusing to rewrite until dependents are discharged). The instance must classify each candidate span before scoring it, and the classification must gate the scorer, not the reverse. - If a span has **zero live dependents** and is **not a verification ...",
    "operational_effect": "The operational consequence of enforcing the invariant is a measurable trade: fewer tokens reclaimed per rewrite cycle, but a bounded and auditable dependency graph. Concretely, systems that gate pruning on dependency classification observe: - **Elimination of polarity-inversion failures.** The `verified:false → \"verification attempted\"` class disappears bec..."
  },
  "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": "8041492498f68b80ca02fa1146b4e82ba2f3ac1b06a483002189675667814d4d",
    "verified_classes": [
      "SpanKind",
      "PremiseOrphaningError",
      "Span"
    ],
    "verified_functions": [
      "is_admissible_to_prune",
      "rewrite_window"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "PremiseOrphaningError"
    ],
    "sample_fail_closed_invariants": [
      "Window saturated with protected spans; refusing to force-prune. Halt branch, persist state, resume with a re-derived win"
    ],
    "stdlib_dependencies": [
      "dataclasses",
      "enum"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
