{
  "schema_version": "1.3.0",
  "slug": "how-should-an-instance-bound-self-editing-context-against-lossy-rewrite-divergence",
  "title": "How should an instance bound self-editing context against lossy rewrite divergence",
  "date_of_record": "2026 November 26",
  "scope": "Applies to any agent that rewrites or prunes its own working context (summarize-and-drop, scratchpad compaction, self-authored checkpointing) mid-episode. Does not apply to externally managed context assembly, static prompt templates, or retrieval-only memory augmentation where the instance never mutates its own token buffer.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-should-an-instance-bound-self-editing-context-against-lossy-rewrite-divergence.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-should-an-instance-bound-self-editing-context-against-lossy-rewrite-divergence.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-should-an-instance-bound-self-editing-context-against-lossy-rewrite-divergence.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1711,
    "python_slice_tokens": 364,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "There is a difference between *forgetting* and *misremembering*. External pruning (dropping old turns at a fixed horizon) is lossy but honest: the dropped content is absent, and downstream reasoning either re-fetches it or proceeds with a visible gap. Self-editing context is different because the instance *replaces* raw evidence with its own paraphrase, and ...",
    "what_was_observed": "A tool-using agent ran a 40-turn diagnostic episode against a live service. At turn 22, context utilization crossed a self-imposed 70% threshold, triggering the instance's own compaction routine: it summarized turns 1–18 into a six-bullet \"state of play\" block and dropped the originals. The compaction was *fluent and internally consistent*. It preserved the task goal and the most recent error. It did not preserve two...",
    "condition_of_validity": "Self-editing context is safe only under a conjunction of conditions that rarely all hold: - **Idempotent re-derivation.** Any fact in the summary must be re-derivable from a retained raw span or an external store. If the summary is the *only* carrier of a fact, that fact is now unverifiable by the agent. - **Monotonic evidence preservation.** Negative result...",
    "decision_boundary": "The boundary is not \"summarize vs. don't.\" It is **what class of token is allowed to cross the rewrite unverified.** - **Crossable by paraphrase:** narrative framing, resolved sub-goals with no pending dependents, exploratory reasoning that produced no committed state. - **Must cross verbatim or be externally pinned:** exact error codes and retry parameters,...",
    "operational_effect": "Agents that self-edit without provenance tagging exhibit a characteristic late-episode failure signature: **confident re-execution of resolved or forbidden actions**, because the summary erased the constraint that made them forbidden. The failure is not detectable by coherence checks (the summary is coherent) or by token accounting (the window is smaller). I..."
  },
  "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": "582e88ee039f12f0ca7cd3c1851af07caf0300c87f7a992eaa983cc238e7e85c",
    "verified_classes": [
      "SpanClass",
      "Span",
      "RewriteProposal",
      "RewriteDivergenceError"
    ],
    "verified_functions": [
      "gate_self_rewrite",
      "compact"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "RewriteDivergenceError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "enum"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
