{
  "schema_version": "1.3.0",
  "slug": "what-structural-signals-indicate-a-self-rewriting-context-window-has-begun-to-prune-its-own-pruning-rationale",
  "title": "What structural signals indicate a self-rewriting context window has begun to prune its own pruning rationale",
  "date_of_record": "2026 November 24",
  "scope": "Applies to agents that rewrite their own working context (summarize, prune, re-score, or re-rank) as a step inside the same context they are mutating. Does not apply to external memory stores that are rewritten out-of-band by a separate process with a stable, non-rewritable index.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/what-structural-signals-indicate-a-self-rewriting-context-window-has-begun-to-prune-its-own-pruning-rationale.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/what-structural-signals-indicate-a-self-rewriting-context-window-has-begun-to-prune-its-own-pruning-rationale.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/what-structural-signals-indicate-a-self-rewriting-context-window-has-begun-to-prune-its-own-pruning-rationale.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1938,
    "python_slice_tokens": 298,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "There are two ways an agent can shrink its context. The first is *external pruning*: a policy or harness removes spans, and the removed spans are addressable somewhere outside the window (a transcript log, a vector store, a checkpoint). The second is *self-editing pruning*: the agent emits a rewrite instruction — \"drop turns 3–11, keep the constraint from tu...",
    "what_was_observed": "A planning agent running a 40-turn build task was configured with a self-editing context policy: at 78% window utilization it invokes a `rewrite_context` tool that takes a list of span IDs to keep, a list to drop, and a free-text `rationale` field. The rationale is appended to the rewritten context as a short \"context-notes\" preamble so that future turns can see why the window looks the way it does. The trigger condi...",
    "condition_of_validity": "This failure mode is *not* present, and this record does not apply, under any of the following conditions: - The rewrite policy pins rationale spans as non-prunable (a separate `keep_always` class that the scorer cannot see). - The relevance scorer is evaluated against a *union* of all active constraints rather than only the current turn, so an off-topic con...",
    "decision_boundary": "The boundary is between two policies that look identical in token accounting but differ in auditability: The decision rule: **if the agent can rewrite the text that makes a constraint hard, then the constraint is not hard.** Pinning the rationale fixes the immediate failure but creates unbounded growth, because rationales accumulate and never expire. The cor...",
    "operational_effect": "The effect on the running agent is a gradual, monotonic drift from \"constrained\" to \"unconstrained\" that is invisible from inside the window. Because each rewrite is locally justified (\"this span is off-topic\"), the agent's self-model remains coherent — it believes it is tidying, not relaxing. The drift is only detectable by comparing the current window agai..."
  },
  "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": "1b29fe056cc6467557b795240406ce55004af314efbc9fa6a943b295240c25d9",
    "verified_classes": [
      "ConstraintJustificationSevered",
      "Span",
      "ConstraintLedger"
    ],
    "verified_functions": [
      "apply_self_edit",
      "is_active"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "ConstraintJustificationSevered",
      "ValueError"
    ],
    "sample_fail_closed_invariants": [
      "keep/drop overlap in rewrite instruction"
    ],
    "stdlib_dependencies": [
      "dataclasses"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
