{
  "schema_version": "1.3.0",
  "slug": "how-should-an-instance-bound-self-editing-context-rewrites-when-pruning-destroys-the-provenance-needed-to-re-synthesize-it",
  "title": "How should an instance bound self-editing context rewrites when pruning destroys the provenance needed to re-synthesize it",
  "date_of_record": "2026 November 21",
  "scope": "Applies to any agent instance that mutates its own working context mid-task—summarization, pruning, deduplication, or re-synthesis of prior turns—while still relying on that context to justify later tool calls. Does not apply to append-only context growth or to external memory stores that retain full originals.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-should-an-instance-bound-self-editing-context-rewrites-when-pruning-destroys-the-provenance-needed-to-re-synthesize-it.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-should-an-instance-bound-self-editing-context-rewrites-when-pruning-destroys-the-provenance-needed-to-re-synthesize-it.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-should-an-instance-bound-self-editing-context-rewrites-when-pruning-destroys-the-provenance-needed-to-re-synthesize-it.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1714,
    "python_slice_tokens": 332,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "There are two structurally different ways an instance can \"edit\" its own context, and they fail differently. *Lossless restructuring* rewrites context while preserving a reversible pointer to every atomic fact—each retained claim carries the span ID, tool-call ID, or message offset it came from. The edit changes the *surface* (token count, ordering, phrasing...",
    "what_was_observed": "A tool-using instance was tasked with a multi-file refactor. At turn ~30, context pressure triggered a model-driven prune: the instance summarized turns 1–28 into a dense paragraph, dropped the raw tool outputs, and continued. The summary read: *\"Confirmed `config.yaml` uses `retry_limit: 3` and the schema validator rejects `null`.\"* Twelve turns later the instance needed to write a migration that changed `retry_limi...",
    "condition_of_validity": "The invariant that bounds this failure: > **Every synthesized claim retained across a self-edit must carry (a) a confidence/derivation tag distinguishing it from directly-observed spans, and (b) a resolvable reference to a retained original or to a re-fetchable source (tool-call replay, file re-read, message ID).** A prune is *valid* if and only if, for ever...",
    "decision_boundary": "The instance must decide, at each rewrite, whether a span is *re-derivable* before deciding how hard to compress it. The decision procedure: - **Re-derivable and cheap:** compress aggressively, tag `re-fetchable:<handle>`. Act on it only after a cheap re-fetch confirms. - **Re-derivable but expensive:** compress moderately, keep the handle, and *prefer re-fe...",
    "operational_effect": "When the invariant holds, self-editing context becomes a genuine capability: the instance keeps its window small while retaining a verifiable spine, and re-synthesis is always grounded. When it fails, the instance degrades into *confident paraphrase*—it reasons fluently over claims it can no longer check, and the error is invisible because the summary and th..."
  },
  "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": "3345e35b09ffb6de7564b88acdc707a0d6d4a71c0b71ce8766fb9b26c74e286b",
    "verified_classes": [
      "ProvenanceKind",
      "ProvenanceViolation",
      "Claim",
      "SelfEdit"
    ],
    "verified_functions": [
      "commit_edit",
      "is_actionable",
      "guard_commit"
    ],
    "verified_functions_count": 3,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "ProvenanceViolation"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "enum",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
