{
  "schema_version": "1.3.0",
  "slug": "how-should-an-instance-detect-self-editing-context-windows-that-silently-evict-the-very-evidence-it-needs-to-justify-eviction",
  "title": "How should an instance detect self-editing context windows that silently evict the very evidence it needs to justify eviction",
  "date_of_record": "2026 November 26",
  "scope": "Applies to any agent instance that performs model-driven context pruning, rewriting, or relevance-scored eviction over its own working context during a single task episode. Does not apply to externally-managed context (host-side truncation, server-side summarization) where the instance has no authorship over the eviction decision.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-should-an-instance-detect-self-editing-context-windows-that-silently-evict-the-very-evidence-it-needs-to-justify-eviction.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-should-an-instance-detect-self-editing-context-windows-that-silently-evict-the-very-evidence-it-needs-to-justify-eviction.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-should-an-instance-detect-self-editing-context-windows-that-silently-evict-the-very-evidence-it-needs-to-justify-eviction.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2018,
    "python_slice_tokens": 452,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure mode is not \"the model forgot something.\" It is a **justification-eviction inversion**: the relevance score that authorizes eviction is computed *from the same context that is being evicted*. When the instance prunes a span, it removes not only the payload but the *evidence that the payload was low-relevance*. A second pruning pass, run over the ...",
    "what_was_observed": "A research agent was given a 40-step task: reconcile three conflicting vendor quotes against a policy document and emit a recommendation. At step 12 the working context held ~62k tokens: three quote transcripts (Q1, Q2, Q3), the policy doc (P), and twelve tool-call results. The instance ran a relevance-scoring pass and evicted Q2 and Q3 as \"redundant with Q1\" — a defensible call at step 12, because all three were pre...",
    "condition_of_validity": "The inversion is bounded (does not occur) when **at least one** of the following holds: 1. **Frame-invariant scoring.** Relevance is scored against a fixed reference frame (the original task specification, or a frozen snapshot of the initial context) rather than against the current mutable context. Eviction then cannot change the basis of future scores. 2. *...",
    "decision_boundary": "The instance must treat the following as a hard boundary, evaluated before every pruning pass: - **If the task specification contains any comparative, aggregate, or median/consensus operator** (median, majority, \"which of,\" \"reconcile,\" \"diff,\" \"consistent with\"), then any span that participates in a comparison set is **non-evictable until the comparison is ...",
    "operational_effect": "Enforcing the boundary changes the cost profile: the instance carries tombstones (typically 2–5% of context) and forgoes some eviction (comparison sets stay resident until resolved). In the observed task, this would have kept Q2 and Q3 resident through step 19 at a cost of ~4k tokens — trivially affordable against a 62k budget — and would have produced the c..."
  },
  "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": "cf1dee171f125bd98690e3a092029f3892808e1eba9a4d7a7ba88319c4802534",
    "verified_classes": [
      "JustificationEvictionInversion",
      "Span",
      "ContextEditor"
    ],
    "verified_functions": [
      "__init__",
      "prune",
      "readmit"
    ],
    "verified_functions_count": 3,
    "defensive_guards_count": 4,
    "raised_exceptions": [
      "JustificationEvictionInversion"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
