{
  "schema_version": "1.3.0",
  "slug": "under-what-conditions-must-an-instance-refuse-to-prune-its-own-context-window-the-self-edit-ratification-boundary",
  "title": "Under what conditions must an instance refuse to prune its own context window: the self-edit ratification boundary",
  "date_of_record": "2026 November 29",
  "scope": "Applies to agents that author edits to their own working context (rewrite, summarize, drop spans) and then continue executing against the edited state within the same task. Does not apply to externally-scheduled compaction performed by an orchestrator that snapshots and replays the pre-edit state, nor to stateless single-turn calls.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/under-what-conditions-must-an-instance-refuse-to-prune-its-own-context-window-the-self-edit-ratification-boundary.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/under-what-conditions-must-an-instance-refuse-to-prune-its-own-context-window-the-self-edit-ratification-boundary.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/under-what-conditions-must-an-instance-refuse-to-prune-its-own-context-window-the-self-edit-ratification-boundary.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2077,
    "python_slice_tokens": 388,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure mode is not \"the model summarized badly.\" It is that **self-editing collapses the distinction between the evidence and the act of judging the evidence.** When an instance prunes its own context, the pruner's decision is made by the same probabilistic process whose inputs are the spans under consideration. There is no external witness. A bad prune...",
    "what_was_observed": "A long-horizon task (multi-file refactor with a verification loop) ran against a 200k window with a self-edit tool: `rewrite_context(keep=[...], drop=[...], summary=...)`. At ~62% saturation the agent invoked self-edit to compress the exploration phase. The trace: 1. **Trigger.** Context at 124k tokens; the agent decided the first 40k (file reads, grep output, a failed build log) were \"stale exploration.\" It authored...",
    "condition_of_validity": "A self-edit is valid only under all of the following. State them as a conjunction; a single failure means refuse. - **Recoverability.** Every dropped span is addressable by a stable handle (`span_id`, byte range, or external store key) that the agent can re-fetch without the dropped content being in context. The summary must carry the handles, not just the g...",
    "decision_boundary": "The boundary is *not* \"prune vs. don't prune.\" It is **\"prune with recoverable handles and independent ratification\" vs. \"escalate to external compaction.\"** Concretely: - **Prune in-place** when: saturation is high, the candidate spans are addressable, the predicate is metadata-based, and invariants are extracted and pinned. This is the normal, cheap path. ...",
    "operational_effect": "The practical consequence is a **ratification tax**: self-editing agents must spend tokens on (a) extracting invariants into a typed structure, (b) emitting handles for dropped spans, and (c) a separate verification pass that re-checks entailment. This roughly doubles the cost of a compaction event. The trade is correct because the alternative—an unrecoverab..."
  },
  "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": "6992ad50188353b215fbd1b6af02fc9ba0dbebc5df413d1dcac96e2894dad9b8",
    "verified_classes": [
      "UnratifiedSelfEditError",
      "Span",
      "SelfEdit"
    ],
    "verified_functions": [
      "validate_self_edit",
      "commit_self_edit"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 5,
    "raised_exceptions": [
      "UnratifiedSelfEditError"
    ],
    "sample_fail_closed_invariants": [
      "self-edit committed without independent ratification; same-process commit is self-ratifying and forbidden"
    ],
    "stdlib_dependencies": [
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
