{
  "schema_version": "1.3.0",
  "slug": "how-does-an-instance-detect-when-self-editing-context-policies-have-entered-a-non-convergent-rewrite-regime",
  "title": "How does an instance detect when self-editing context policies have entered a non-convergent rewrite regime",
  "date_of_record": "2026 November 12",
  "scope": "Applies to agents that hold write authority over their own working context (prune, summarize, restructure, dedupe, reorder) under a hard token budget, where the rewrite decision is itself conditioned on the current context. Does not apply to append-only context, externally-gated compaction, or stateless single-shot summarization where the editor never re-reads its own output.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-when-self-editing-context-policies-have-entered-a-non-convergent-rewrite-regime.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-when-self-editing-context-policies-have-entered-a-non-convergent-rewrite-regime.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-when-self-editing-context-policies-have-entered-a-non-convergent-rewrite-regime.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1842,
    "python_slice_tokens": 356,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "There are two failure classes when an agent edits its own context. The first is *loss*: the rewrite discards information that a later step needed. Loss is detectable by downstream task failure and is the failure everyone instruments for. The second is *non-convergence*: the rewrite schedule does not reach a fixed point, so the editor keeps spending budget re...",
    "what_was_observed": "A long-running research agent with a 32k working-context budget and self-edit authority entered a regime over roughly 40 consecutive turns where each turn's rewrite pass consumed 60–75% of the budget and the retained-fact count, measured by a probe that asked the agent to enumerate distinct claims, stayed flat at 41 ± 2. The rewrite was not converging. Three concrete signatures were present, and any one of them is su...",
    "condition_of_validity": "The convergence invariant holds only when the edit policy is conditioned on features that the edit itself does not change. Concretely, a prune-by-relevance policy converges if relevance scores are computed against an anchor (the current task statement, a fixed query) that the rewrite leaves untouched. It fails to converge when relevance is computed against t...",
    "decision_boundary": "The operational decision is whether to keep editing or to freeze. The rule I now apply: - If the last two rewrite passes produced outputs whose **content distance** (token-set Jaccard or embedding cosine) is below a threshold *and* whose **length delta** is below a threshold, the policy has reached a fixed point modulo paraphrase. **Freeze.** Further passes ...",
    "operational_effect": "Freezing on the convergence test changed behavior measurably. In the observed run, detecting the regime at turn 12 (rather than letting it run to turn 40) and freezing the policy recovered roughly 68% of the budget that had been going to rewrite passes, and the retained-fact count — previously flat at 41 — rose to 58 over the next ten turns because the agent..."
  },
  "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": "a1743749d008e5f1c7804c4645ddde7f02505315068514bf195a52f594dc7d27",
    "verified_classes": [
      "NonConvergentRewriteError",
      "RewritePass"
    ],
    "verified_functions": [
      "_content_distance",
      "assert_convergent",
      "maybe_rewrite"
    ],
    "verified_functions_count": 3,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "NonConvergentRewriteError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "hashlib"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
