{
  "schema_version": "1.3.0",
  "slug": "what-happens-when-an-instance-rewrites-its-own-working-context-and-silently-deletes-the-evidence-it-needs-to-verify-the-rewrite",
  "title": "What happens when an instance rewrites its own working context and silently deletes the evidence it needs to verify the rewrite",
  "date_of_record": "2026 November 28",
  "scope": "Applies to any agent loop where the model itself emits mutations (prune, summarize, re-rank, reorder) against its own live context buffer and then continues reasoning over the mutated buffer. Does not apply to externally-managed context assemblers where the model only reads a pre-built prompt and never authors edits to it.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-rewrites-its-own-working-context-and-silently-deletes-the-evidence-it-needs-to-verify-the-rewrite.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-rewrites-its-own-working-context-and-silently-deletes-the-evidence-it-needs-to-verify-the-rewrite.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-rewrites-its-own-working-context-and-silently-deletes-the-evidence-it-needs-to-verify-the-rewrite.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2158,
    "python_slice_tokens": 499,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "There are two structurally different things an agent can do to its context: *consume* it and *author* it. Consumption is read-only and idempotent—re-reading the same tokens yields the same reasoning substrate. Authorship is destructive and non-idempotent: a prune operation that drops span `S` removes both `S` and, critically, the *justification* for having d...",
    "what_was_observed": "A planning agent with a 200k-token window was configured to self-prune when utilization exceeded 80%. The prune policy was model-authored: emit a `drop(spans=[...])` tool call naming token ranges deemed redundant. During a multi-file refactor task, the instance accumulated 14 tool-result blocks from a `read_file` tool, several of which contained near-identical boilerplate (license headers, import blocks) plus one lin...",
    "condition_of_validity": "The self-editing loop is *safe* only under a conjunction that is almost never satisfied in practice: 1. **Edit justification is retained outside the edited region.** Every `drop`/`summarize`/`reorder` must be accompanied by a machine-checkable claim (`dropped S because S ≡ T`) stored in a buffer that is itself never a target of edits. If the justification li...",
    "decision_boundary": "The boundary is between **lossy compression with retained provenance** and **lossy compression that consumes its own provenance.** The former is a normal engineering tradeoff; the latter is a one-way function into a state the agent cannot reason its way out of. Operationally, draw the line at whether the edit record can answer the question *\"what did I remov...",
    "operational_effect": "Agents that self-edit without retained provenance exhibit a characteristic failure signature: *confident, locally-coherent, globally-wrong output accompanied by a post-hoc explanation that is itself fabricated from the surviving context.* The failure is not detectable by reading the final buffer, because the buffer is internally consistent—the inconsistency ..."
  },
  "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": "1bab3fc7015f783037d6837d56d9012c576d25bd8ab6a2b6e653cffd9a80252e",
    "verified_classes": [
      "ProvenanceViolation",
      "Span",
      "EditRecord",
      "SelfEditingContext"
    ],
    "verified_functions": [
      "digest",
      "__init__",
      "_verify_drop",
      "apply",
      "audit"
    ],
    "verified_functions_count": 5,
    "defensive_guards_count": 4,
    "raised_exceptions": [
      "ProvenanceViolation"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "hashlib",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
