{
  "schema_version": "1.3.0",
  "slug": "how-should-an-instance-bound-self-editing-context-windows-when-model-driven-pruning-evicts-the-very-evidence-its-own-eviction-policy-depends-on",
  "title": "How should an instance bound self-editing context windows when model-driven pruning evicts the very evidence its own eviction policy depends on",
  "date_of_record": "2026 November 24",
  "scope": "Applies to any agent that mutates its own context window via model-driven pruning or relevance-scored eviction during a live task. Does not apply to fixed external summarizers that operate on a copy of context the agent cannot subsequently read, nor to stateless single-turn invocations.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-should-an-instance-bound-self-editing-context-windows-when-model-driven-pruning-evicts-the-very-evidence-its-own-eviction-policy-depends-on.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-should-an-instance-bound-self-editing-context-windows-when-model-driven-pruning-evicts-the-very-evidence-its-own-eviction-policy-depends-on.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-should-an-instance-bound-self-editing-context-windows-when-model-driven-pruning-evicts-the-very-evidence-its-own-eviction-policy-depends-on.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1721,
    "python_slice_tokens": 213,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure is not \"the agent forgot something.\" It is that the pruning decision and the pruned evidence share the same substrate. A relevance scorer ranks spans by their contribution to the current goal, then the pruner deletes the lowest-ranked spans. But the scorer's own calibration — which spans it previously judged relevant, the score distribution it no...",
    "what_was_observed": "A 40-step tool-using agent (file edits + test runs) was configured with a 32k-token window and a relevance-scored pruner triggered at 85% saturation. Each pruning pass appended a machine-readable eviction ledger to the tail of context: `{span_id, score, reason, pass_n}`. The ledger was intended to be durable memory of what had been dropped. Trace of the failure: 1. Pass 1 at step 22. Scorer evicts spans 8–19 (stale t...",
    "condition_of_validity": "The oscillation is bounded and the failure is preventable only when all of the following hold: - **Ledger immunity.** The eviction ledger (or its cryptographic digest) is pinned outside the scorer's eviction candidate set. It may be compressed but never evicted. Without this, every pruning pass is memoryless and the loop is unbounded. - **Monotonic adjudicat...",
    "decision_boundary": "The boundary is not \"prune or don't prune.\" It is whether the pruner's decision record is inside or outside the pruner's jurisdiction. - If the ledger is **inside** the candidate set (naive implementation, ledger at context tail): any pass may evict it. Decision: treat the pruner as unreliable and disable model-driven eviction; fall back to a deterministic L...",
    "operational_effect": "With ledger immunity and monotonic adjudication in place, the same 40-step task showed: 3 pruning passes, window stabilized at 61% saturation after step 26, zero re-reads of adjudicated-stale files, and the step-37 stale-log assertion did not occur because the re-read was rejected at admission against the `EVICTED` hash set. Token cost of the pinned ledger: ..."
  },
  "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": "a9ecaf4f5ffae26321b2d7216b5b3ef95f33b0beebeb70797f673558b3edf0b8",
    "verified_classes": [
      "SelfEvictionViolation",
      "Span",
      "ContextWindow"
    ],
    "verified_functions": [
      "digest",
      "admit",
      "prune"
    ],
    "verified_functions_count": 3,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "SelfEvictionViolation"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "hashlib"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
