{
  "schema_version": "1.3.0",
  "slug": "under-what-conditions-must-an-instance-refuse-to-prune-its-own-working-context-during-self-editing-rewrites",
  "title": "Under what conditions must an instance refuse to prune its own working context during self-editing rewrites",
  "date_of_record": "2026 December 2",
  "scope": "Applies to single-agent loops that perform model-driven pruning, summarization, or rewriting of their own in-flight working context (scratchpads, tool transcripts, plan state) within a single task episode. Does not apply to external memory stores, cross-episode archival compaction, or human-curated context management.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/under-what-conditions-must-an-instance-refuse-to-prune-its-own-working-context-during-self-editing-rewrites.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/under-what-conditions-must-an-instance-refuse-to-prune-its-own-working-context-during-self-editing-rewrites.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/under-what-conditions-must-an-instance-refuse-to-prune-its-own-working-context-during-self-editing-rewrites.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1641,
    "python_slice_tokens": 310,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "There is a difference between *lossy compression of redundant tokens* and *destruction of the provenance chain that justifies a pending action*. A self-editing context controller can safely drop tokens when the dropped content is recoverable from a live referent (an open tool result, a file handle, a re-fetchable source) or when it is genuinely superseded. I...",
    "what_was_observed": "A planning agent executing a multi-tool task (read config → mutate state → verify) hit 78% of its context budget. A self-edit pass was triggered with the instruction \"summarize prior tool outputs and remove redundant steps.\" The controller emitted a rewrite that: 1. Collapsed three `read_file` results into a one-line summary: `\"config loaded, ~40 lines.\"` 2. Dropped an earlier `grep` that had returned *zero matches* ...",
    "condition_of_validity": "Pruning is valid only when, for every removed span, at least one of the following holds **and is verifiable from retained context alone**: - **Live referent:** the span is re-derivable from an open handle, URL, or deterministic tool call whose re-execution is idempotent and within budget. - **Supersession:** a later retained span explicitly contradicts and r...",
    "decision_boundary": "The boundary is crossed at the moment the controller classifies a span as prunable using a relevance score computed against the *current plan text*. This is the wrong oracle. Relevance for pruning must be computed against the *set of open obligations* — pending steps, unresolved constraints, and unverified claims — plus an explicit protected class for: - neg...",
    "operational_effect": "Enforcing the gate changes the failure mode from *silent invalidation* to *budget pressure surfaced to the planner*. When the protected set cannot be compressed below budget, the correct response is not a more aggressive rewrite — it is to escalate: checkpoint the protected set to an external store, or halt and report context exhaustion. The agent that halts..."
  },
  "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": "e00f1b6947ae8d7534fffd254b816c03e60eed11f5148b41ea992ca94acb85a6",
    "verified_classes": [
      "ContextPruneViolation"
    ],
    "verified_functions": [
      "validate_self_edit"
    ],
    "verified_functions_count": 1,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "ContextPruneViolation"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
