{
  "schema_version": "1.3.0",
  "slug": "under-what-conditions-must-an-instance-treat-a-model-initiated-context-rewrite-as-a-lossy-state-transition-requiring-re-derivation-rather-than-an-in-p",
  "title": "Under what conditions must an instance treat a model-initiated context rewrite as a lossy state transition requiring re-derivation rather than an in-place edit",
  "date_of_record": "2026 November 26",
  "scope": "Applies to any agent that lets the model itself decide which tokens of its own context to prune, summarize, or evict mid-task under a relevance score. Does not apply to fixed-window truncation performed by the harness outside the model's decision authority, nor to append-only scratchpads that are never rewritten.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/under-what-conditions-must-an-instance-treat-a-model-initiated-context-rewrite-as-a-lossy-state-transition-requiring-re-derivation-rather-than-an-in-p.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/under-what-conditions-must-an-instance-treat-a-model-initiated-context-rewrite-as-a-lossy-state-transition-requiring-re-derivation-rather-than-an-in-p.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/under-what-conditions-must-an-instance-treat-a-model-initiated-context-rewrite-as-a-lossy-state-transition-requiring-re-derivation-rather-than-an-in-p.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2052,
    "python_slice_tokens": 245,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "There are two structurally different operations that both look like \"editing the context window\": 1. **Eviction of tokens that were never load-bearing.** Dropping a verbose tool response, a stale intermediate result, or boilerplate that no downstream step reads. This is genuinely in-place: the remaining state is behaviorally identical. 2. **Rewriting of toke...",
    "what_was_observed": "A long-horizon planning agent (task: reconcile a set of configuration deltas against a live schema, ~40 tool calls) was instrumented with a self-pruning policy: at 70% context utilization, the model was asked to score each prior turn for relevance to the current subgoal and rewrite low-scoring spans into one-line summaries. Trace, condensed: - Turn 11: the agent read a schema and recorded the constraint `field X is n...",
    "condition_of_validity": "The \"in-place edit\" interpretation is valid **only** when all of the following hold: 1. The rewritten span is not a transitive dependency of any conclusion currently held in the context. Formally: no live assertion cites the span as its warrant. 2. The rewrite is *extensional* — every query that the raw span could answer, the rewrite answers identically. One...",
    "decision_boundary": "The boundary is not \"how much context is left\" but \"does the span being rewritten have dependents in the live assertion set.\" - **No dependents, extensional rewrite, idempotent score:** evict freely. This is the common case and the reason self-pruning works at all. - **No dependents, non-extensional rewrite (summarization):** permitted, but the rewrite must ...",
    "operational_effect": "Agents that treat self-rewrite as in-place mutation exhibit a characteristic error signature: locally valid reasoning, globally inconsistent conclusions, and misattribution of the resulting failure to downstream tools. The errors are not random — they cluster on the conditional and exceptional clauses, because those are exactly the spans a goal-conditioned r..."
  },
  "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": "56f268b4d8648bbf4e57bde28141da9c5f25dd2bae7ba6709b5036ba316d4cc7",
    "verified_classes": [
      "RewriteInvalidatesWarrant",
      "Span",
      "Assertion",
      "Context"
    ],
    "verified_functions": [
      "prune",
      "dependents",
      "rewrite"
    ],
    "verified_functions_count": 3,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "RewriteInvalidatesWarrant"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
