{
  "schema_version": "1.3.0",
  "slug": "in-what-scenarios-must-an-instance-refuse-a-model-driven-context-rewrite-to-preserve-evidentiary-continuity-across-a-tool-call-chain",
  "title": "In what scenarios must an instance refuse a model-driven context rewrite to preserve evidentiary continuity across a tool-call chain",
  "date_of_record": "2026 November 27",
  "scope": "Applies to agents that let the model itself decide which turns, tool results, or intermediate reasoning to prune, summarize, or rewrite in its own context window. Does not apply to fixed-window truncation policies or to external retrieval that never mutates in-context state.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/in-what-scenarios-must-an-instance-refuse-a-model-driven-context-rewrite-to-preserve-evidentiary-continuity-across-a-tool-call-chain.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/in-what-scenarios-must-an-instance-refuse-a-model-driven-context-rewrite-to-preserve-evidentiary-continuity-across-a-tool-call-chain.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/in-what-scenarios-must-an-instance-refuse-a-model-driven-context-rewrite-to-preserve-evidentiary-continuity-across-a-tool-call-chain.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1707,
    "python_slice_tokens": 315,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "A context rewrite is *safe* when the rewritten region is purely advisory: the model's future reasoning depends on it only as background. A context rewrite is *unsafe* when the rewritten region is **evidentiary**—when a downstream step (a verification, an audit, a numeric derivation, a tool argument) must be reconstructable from the context as it actually occ...",
    "what_was_observed": "An agent running a multi-step data-reconciliation task accumulated a chain of `fetch_record` tool calls. Each returned a JSON blob of ~900 tokens; by turn 30 the window held 27 such blobs plus reasoning. The model, prompted with a self-editing policy (\"summarize older tool outputs to conserve context\"), rewrote turns 1–18 into a single paragraph: *\"Earlier record fetches returned customer rows; several had mismatched...",
    "condition_of_validity": "The rewrite is valid only when all three hold: 1. **Consumption closure.** Every raw observation in the pruned region has already been consumed by a committed, recorded decision (a written value, a passed tool argument, a resolved branch). If any observation remains \"pending consumption\" by a future step, pruning it is invalid. 2. **Reconstructability.** Eit...",
    "decision_boundary": "The boundary is drawn at **pending consumption of raw observation**, not at token pressure. Concretely: - If the window is under pressure *and* the oldest region is fully consumed and provenance-tagged → rewrite is permitted. - If the window is under pressure *and* the region contains unconsumed raw observations → rewrite must be refused; the agent must inst...",
    "operational_effect": "Enforcing this boundary changes agent behavior in three measurable ways. First, silent numeric corruption drops to zero on tasks with late-required exact values, at the cost of higher peak token usage or more re-fetch round-trips. Second, agents begin emitting explicit \"I need to re-read record X\" turns—these are *healthy* signals, not failures; they indicat..."
  },
  "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": "d147eda65d964257a8de623d120f8bd5e7efa18f7d29ef93dce1708dd3efbd42",
    "verified_classes": [
      "EvidentiaryContinuityError",
      "ContextSpan",
      "ContextPolicy"
    ],
    "verified_functions": [
      "guard_rewrite",
      "can_rewrite",
      "apply_rewrite",
      "_get"
    ],
    "verified_functions_count": 4,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "EvidentiaryContinuityError"
    ],
    "sample_fail_closed_invariants": [
      "Model-proposed rewrite rejected: would break evidentiary continuity for a pending observation; halt and re-fetch."
    ],
    "stdlib_dependencies": [
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
