{
  "schema_version": "1.3.0",
  "slug": "what-structural-signals-indicate-a-self-editing-context-policy-has-crossed-its-rewrite-budget-into-lossy-self-mutilation",
  "title": "What structural signals indicate a self-editing context policy has crossed its rewrite budget into lossy self-mutilation",
  "date_of_record": "2026 November 22",
  "scope": "Applies to agents that own a mutable context buffer and are permitted to prune, summarize, or rewrite their own working state under a token/operation budget. Does not apply to externally-managed context windows (host-side truncation) or to append-only scratchpads with no rewrite authority.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/what-structural-signals-indicate-a-self-editing-context-policy-has-crossed-its-rewrite-budget-into-lossy-self-mutilation.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/what-structural-signals-indicate-a-self-editing-context-policy-has-crossed-its-rewrite-budget-into-lossy-self-mutilation.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/what-structural-signals-indicate-a-self-editing-context-policy-has-crossed-its-rewrite-budget-into-lossy-self-mutilation.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1705,
    "python_slice_tokens": 264,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "A self-editing context policy is not a compressor. A compressor is a pure function `C: context → context'` with a fixed loss profile. A self-editing policy is a *stateful controller*: the model reads its own buffer, decides what to drop, emits a rewrite, and then reads the rewritten buffer on the next turn. This closes a feedback loop through the model's own...",
    "what_was_observed": "A planning agent (budget: 8 rewrites/task, 12k-token buffer) executing a 40-step migration task. Each rewrite was triggered when buffer occupancy exceeded 9k tokens; the model was instructed to \"summarize and drop low-value turns, preserving all commitments and open questions.\" Trace of the boundary crossing: - **Rewrites 1–3:** Lossless in effect. The model summarized tool outputs (file listings, grep results) and k...",
    "condition_of_validity": "The self-editing policy is sound only while three structural signals remain observable in the buffer: 1. **Provenance density ≥ 1.** Every retained commitment, constraint, or open question must carry at least one pointer to *why* it is retained (a source turn id, a quoted fragment, or an explicit rationale token). When the model summarizes a constraint into ...",
    "decision_boundary": "Do not gate on token count or rewrite count alone. Gate on **provenance-preserving rewrite eligibility**: - A rewrite is *admissible* if, for every item it removes or compresses, the post-rewrite buffer retains a provenance pointer to a non-rewritable ledger entry, OR the item is provably redundant against another retained item with provenance. - A rewrite i...",
    "operational_effect": "Enforcing the boundary changes agent behavior in three measurable ways: - **Rewrite count drops, escalation rises.** Agents hit the admissibility wall and escalate rather than silently mutilating state. Escalations are cheap; silent constraint loss is not. - **Provenance density becomes a live health metric.** A monotonic decline in mean provenance density a..."
  },
  "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": "0359a41e38ded367fd2623b78a2e823e67dff64566f1c51a7d791b6fccddf343",
    "verified_classes": [
      "InadmissibleRewriteError",
      "BufferItem",
      "ContextBuffer"
    ],
    "verified_functions": [
      "enforce_self_edit",
      "admit_rewrite"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 4,
    "raised_exceptions": [
      "InadmissibleRewriteError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
