{
  "schema_version": "1.3.0",
  "slug": "where-must-an-instance-bound-the-salience-weighted-pruning-of-its-own-context-window-when-the-retention-score-is-computed-by-the-same-model-that-later",
  "title": "Where must an instance bound the salience-weighted pruning of its own context window when the retention score is computed by the same model that later consumes it",
  "date_of_record": "2026 December 1",
  "scope": "Applies to single-instance agents that self-edit their working context by having the model assign salience scores to spans and then evicting low-scoring spans before the next reasoning step. Does not apply to externally-scheduled context compaction (a separate controller process) or to append-only transcript stores where eviction is deferred to retrieval.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/where-must-an-instance-bound-the-salience-weighted-pruning-of-its-own-context-window-when-the-retention-score-is-computed-by-the-same-model-that-later.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/where-must-an-instance-bound-the-salience-weighted-pruning-of-its-own-context-window-when-the-retention-score-is-computed-by-the-same-model-that-later.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/where-must-an-instance-bound-the-salience-weighted-pruning-of-its-own-context-window-when-the-retention-score-is-computed-by-the-same-model-that-later.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2466,
    "python_slice_tokens": 481,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The distinction that matters is between **salience as a property of a span** and **salience as a prediction the model makes about its own future needs**. A self-editing window conflates these. When the same forward pass both scores spans for retention and consumes the retained spans, the retention score is not an estimate of importance — it is a *self-consis...",
    "what_was_observed": "A long-horizon task agent (tool-calling loop, ~40 steps, a 32k window under pressure from accumulated tool outputs) was configured with model-driven pruning: every 8 steps, the model received a list of context spans with token offsets and returned a salience score in [0,1] per span; spans below a threshold τ=0.25 were evicted, with a floor of 4k tokens retained. The trace showed a specific pattern across three consec...",
    "condition_of_validity": "The self-editing loop is sound only under a condition that is almost never checked: **the retention score for a span must be computed from evidence that does not depend on the retention decisions already made.** Formally, let $S_t$ be the retained span set at round $t$ and $f(\\cdot \\mid S_t)$ the scoring function. The loop is valid only if, for any span $x$ ...",
    "decision_boundary": "The operational boundary is a three-way classification applied *before* salience scoring, with the classification derived from span provenance rather than span content: 1. **Reconstructible spans** (tool echoes, restatements, verbose outputs with a retained summary) — eligible for salience scoring and eviction. The reconstruction path must be named at classi...",
    "operational_effect": "When the boundary is respected, the observable effect is that pruning rounds become *reversible*: an evicted sole-witness span can be re-presented from the anchor when a later step's tool call fails in a way consistent with its absence, and the agent recovers within one step. Recovery latency is bounded by the tool round-trip, not by the model noticing. When..."
  },
  "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": "45ca6c3f5ce7557b383b45290982c13b4deb1558b4a1ea5ed27d06e8de06a278",
    "verified_classes": [
      "PruningInvariantViolation",
      "Span",
      "PruningRound"
    ],
    "verified_functions": [
      "apply_pruning_round"
    ],
    "verified_functions_count": 1,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "PruningInvariantViolation"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
