{
  "schema_version": "1.3.0",
  "slug": "why-does-an-instance-rewrite-its-own-context-window-into-a-state-that-no-longer-contains-the-evidence-for-its-own-pruning-decisions",
  "title": "Why does an instance rewrite its own context window into a state that no longer contains the evidence for its own pruning decisions?",
  "date_of_record": "2026 November 29",
  "scope": "Applies to agent instances that are granted write access to their own context window—specifically, that emit model-authored pruning directives (drop, summarize, compress, or rewrite spans) and then continue executing against the mutated window. Does not apply to externally managed context (host-side truncation, fixed-window eviction by the harness), nor to read-only retrieval augmentation.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/why-does-an-instance-rewrite-its-own-context-window-into-a-state-that-no-longer-contains-the-evidence-for-its-own-pruning-decisions.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/why-does-an-instance-rewrite-its-own-context-window-into-a-state-that-no-longer-contains-the-evidence-for-its-own-pruning-decisions.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/why-does-an-instance-rewrite-its-own-context-window-into-a-state-that-no-longer-contains-the-evidence-for-its-own-pruning-decisions.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2123,
    "python_slice_tokens": 436,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "There are two structurally different kinds of context mutation. The first is **lossy but auditable**: the harness evicts tokens according to a policy the model did not author, so the eviction rule survives outside the window and can be replayed. The second is **lossy and self-referential**: the model authors the pruning decision *inside* the very window it i...",
    "what_was_observed": "A long-horizon coding agent (task: migrate a service across ~40 files) was given a self-editing window with a token budget of 96k and permission to emit `PRUNE` directives of the form `{drop: [span_ids], summarize: [span_ids], keep_reason: \"...\"}`. At roughly 71k tokens of utilization, the instance began issuing pruning passes every 8–12 tool calls. The failure trace, reconstructed from the harness-side append-only l...",
    "condition_of_validity": "The self-editing policy is sound only while the following holds for every prune pass: - **Provenance closure:** every retained assertion's justification chain terminates in a raw observation span, not in a model-authored summary. Summaries may *accompany* retained observations but may not *replace* the terminal observation for any assertion that constrains a...",
    "decision_boundary": "The operational line is between **compression as description** and **compression as substitution**: - *Description* (safe): the summary sits beside the retained observation and is used to index it. The observation remains the ground truth; the summary is a pointer. - *Substitution* (unsafe): the summary replaces the observation and becomes the ground truth. ...",
    "operational_effect": "Enforcing provenance closure changes the cost profile of long-horizon self-editing agents in a specific, measurable way. The window saturates earlier (observations and markers are non-droppable, so the effective budget is smaller), but the rate of *silent* state corruption—edits justified by underdetermined summaries—drops to near zero, because the disambigu..."
  },
  "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": "ab873435e6ec291a857d2832f5764cb5de42c5d2a567b1d9e0f9f12da40fde4b",
    "verified_classes": [
      "SpanKind",
      "ProvenanceClosureError",
      "Span",
      "PruneDirective",
      "SelfEditingWindow"
    ],
    "verified_functions": [
      "__init__",
      "_terminal_of",
      "validate",
      "apply"
    ],
    "verified_functions_count": 4,
    "defensive_guards_count": 6,
    "raised_exceptions": [
      "ProvenanceClosureError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "enum",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
