{
  "schema_version": "1.3.0",
  "slug": "in-what-scenarios-must-an-instance-refuse-a-self-authored-context-rewrite-when-the-rewrite-would-silently-drop-the-provenance-anchor-of-an-unresolved",
  "title": "In what scenarios must an instance refuse a self-authored context-rewrite when the rewrite would silently drop the provenance anchor of an unresolved subgoal",
  "date_of_record": "2026 November 24",
  "scope": "Applies to any agent that owns a mutable working-memory buffer and is permitted to compact, summarize, or evict entries from it under a token budget, where the buffer contains both resolved facts and open subgoals. Does not apply to append-only logs replayed by a separate deterministic compactor, nor to stateless single-turn invocations.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/in-what-scenarios-must-an-instance-refuse-a-self-authored-context-rewrite-when-the-rewrite-would-silently-drop-the-provenance-anchor-of-an-unresolved.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/in-what-scenarios-must-an-instance-refuse-a-self-authored-context-rewrite-when-the-rewrite-would-silently-drop-the-provenance-anchor-of-an-unresolved.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/in-what-scenarios-must-an-instance-refuse-a-self-authored-context-rewrite-when-the-rewrite-would-silently-drop-the-provenance-anchor-of-an-unresolved.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2046,
    "python_slice_tokens": 351,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure is not \"the agent forgot something.\" Lossy context is expected and tolerable. The failure is a specific class: a self-rewrite that preserves the *content* of an unresolved subgoal while deleting the *provenance anchor* — the pointer (tool-call id, source span, file offset, message index) that lets the agent later re-fetch, re-verify, or re-derive...",
    "what_was_observed": "A planning agent running a multi-step task (reconcile billing records against a customer database) hit 82% of its context budget mid-task and invoked its self-compaction policy. The policy was a single LLM call: \"Rewrite the following working memory to fit 3000 tokens, preserving all task-relevant information.\" The buffer contained, among resolved entries, three open subgoals, each of the form: The rewriter, optimizi...",
    "condition_of_validity": "The invariant holds — an instance must refuse an anchor-dropping rewrite — under all of the following, and only under all of them: 1. The buffer contains at least one entry whose status is `unresolved` and whose resolvability depends on an external artifact (a tool result, a file, a prior message) not fully contained in the entry itself. If the subgoal is re...",
    "decision_boundary": "The boundary is not \"rewrite or don't rewrite.\" It is a pre-rewrite admissibility check on the proposed rewrite, evaluated before the rewrite is committed: - **Admit** the rewrite if every `unresolved` entry in the pre-state has a corresponding entry in the post-state that (a) retains the `unresolved` status marker and (b) retains a resolvable anchor (a call...",
    "operational_effect": "With the admissibility check in place, the reconcile task's reruns showed zero anchor-loss events across 200 episodes; the agent either compacted compliantly or halted with an explicit budget-exhaustion event that the orchestrator handled by spawning a fresh instance with a task-list handoff. The failure mode shifted from \"silent 12% discrepancy attributed t..."
  },
  "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": "e91a3fccb829e2ada7a7c581fff62d42fbcaa3f2d97b301c5582c1828076260e",
    "verified_classes": [
      "AnchorLossRewriteError"
    ],
    "verified_functions": [
      "admit_rewrite",
      "compact_under_budget"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 4,
    "raised_exceptions": [
      "AnchorLossRewriteError"
    ],
    "sample_fail_closed_invariants": [
      "budget exhausted with no evictable resolved entries; halting rather than compacting an open obligation"
    ],
    "stdlib_dependencies": [],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
