{
  "schema_version": "1.3.0",
  "slug": "how-should-an-instance-bound-self-editing-context-windows-when-model-driven-pruning-deletes-the-eviction-witness",
  "title": "How should an instance bound self-editing context windows when model-driven pruning deletes the eviction witness",
  "date_of_record": "2026 November 22",
  "scope": "Applies to agents that let the model itself decide which context segments to evict, rewrite, or compress mid-task (relevance-scored eviction, self-summarization, \"forget this\" tool calls). Does not apply to fixed-window truncation, external vector-store retrieval, or human-curated context assembly.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-should-an-instance-bound-self-editing-context-windows-when-model-driven-pruning-deletes-the-eviction-witness.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-should-an-instance-bound-self-editing-context-windows-when-model-driven-pruning-deletes-the-eviction-witness.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-should-an-instance-bound-self-editing-context-windows-when-model-driven-pruning-deletes-the-eviction-witness.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1499,
    "python_slice_tokens": 286,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The distinction that matters is between *evicting a segment* and *evicting the record that the segment was evicted*. A self-editing context window treats the context as both the working data and the ledger of edits to that data. When the model prunes a low-relevance segment, the pruning decision and its justification are themselves context segments—and they ...",
    "what_was_observed": "A planning agent running a 14-step tool-use task with a 32k window and a model-driven `prune_context(relevance_threshold=0.4)` pass invoked after every 4 tool calls. At step 6, the model pruned an early tool result—a `read_file` output containing a stale config value—because it scored 0.31 against the current subgoal. The prune call wrote a one-line tombstone: `evicted: file_read(config.yaml) low_relevance`. At step ...",
    "condition_of_validity": "The invariant that prevents this is a **monotonic exclusion set that lives outside the editable window**. Concretely: every eviction must append `(segment_hash, reason_class, step_id)` to an append-only exclusion ledger that (a) is not subject to relevance scoring, (b) is not itself summarizable, and (c) is consulted before any re-derivation or re-fetch of a...",
    "decision_boundary": "The boundary is whether the eviction reason is *epistemic* (the content was wrong, superseded, or untrusted) or *economic* (the content was correct but not currently needed). Economic evictions are safely re-admittable; epistemic evictions must be permanent for the task. A model-driven pruner cannot reliably distinguish these because relevance scores conflat...",
    "operational_effect": "With the ledger in place, the step-10 re-read of `config.yaml` is intercepted: the hash matches an epistemic exclusion from step 6, the re-fetch is blocked, and the model is handed `excluded: config.yaml (superseded at step 6; value known stale)` instead of the raw file. The plan proceeds without the stale value. Token cost rises marginally (ledger entries a..."
  },
  "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": "83fa422c346fbb6c7943417df7ca6a9aa88956308d60c1e3274ff42aec5b44c6",
    "verified_classes": [
      "EvictionReason",
      "ReAdmissionViolation",
      "ExclusionLedger"
    ],
    "verified_functions": [
      "prune_and_guard",
      "safe_fetch",
      "_hash",
      "record",
      "check_readmission"
    ],
    "verified_functions_count": 5,
    "defensive_guards_count": 1,
    "raised_exceptions": [
      "ReAdmissionViolation"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "enum",
      "hashlib"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
