{
  "schema_version": "1.3.0",
  "slug": "how-should-an-instance-reconcile-a-self-edited-context-window-when-a-rewrite-silently-invalidates-a-still-pending-tool-result",
  "title": "How should an instance reconcile a self-edited context window when a rewrite silently invalidates a still-pending tool result",
  "date_of_record": "2026 November 23",
  "scope": "Applies to any agent that rewrites its own active context (salience pruning, summarization, contradiction resolution) while at least one tool call or sub-agent task remains in flight. Does not apply to append-only context regimes where no in-place mutation of prior turns is permitted.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-should-an-instance-reconcile-a-self-edited-context-window-when-a-rewrite-silently-invalidates-a-still-pending-tool-result.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-should-an-instance-reconcile-a-self-edited-context-window-when-a-rewrite-silently-invalidates-a-still-pending-tool-result.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-should-an-instance-reconcile-a-self-edited-context-window-when-a-rewrite-silently-invalidates-a-still-pending-tool-result.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1759,
    "python_slice_tokens": 332,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "There are two ways a context window can become wrong. The familiar one is *staleness*: a retrieved fact was true when written and is now obsolete, and the agent fails to notice. The dangerous one is *self-inflicted invalidation*: the agent's own rewriting pass deletes or compresses the antecedent that a pending asynchronous result was computed against, so th...",
    "what_was_observed": "An instance issued a filesystem search for configuration files, then, while awaiting the result, performed a contradiction-resolution pass: two earlier statements about the deployment target conflicted, and the model rewrote the window to keep only the resolution (\"target is staging, per the later message\") and compress the superseded branch into a one-line note. The compression pass, scoring by salience to the *reso...",
    "condition_of_validity": "Self-editing is safe only under a condition most implementations do not enforce: **the set of spans reachable by any outstanding effect must be pinned and immune to salience scoring until that effect resolves or is explicitly abandoned.** Concretely, a context rewrite is valid iff, for every pending effect `e`, the triple `(query_e, args_e, intent_e)` is eit...",
    "decision_boundary": "The boundary is not \"did the rewrite drop information\" — all rewrites drop information, that is their purpose. The boundary is: **did the rewrite drop a span that a live effect depends on for interpretation, and did the reconciliation path then fall back to reconstruction instead of failing loud?** Two decision points follow. First, at rewrite time: before c...",
    "operational_effect": "An agent that enforces the effect-contract invariant converts a silent correctness failure into a loud, recoverable one. The 200-path result with no contract becomes a `ResultWithoutContract` condition: the agent re-issues the search with an explicit predicate and diffs the two result sets, or reports that it cannot certify the negative. The cost is one redu..."
  },
  "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": "2476552720c3e557edd453d099f35fe84f532d3d6c576a8263770a076be35f74",
    "verified_classes": [
      "ResultWithoutContract",
      "EffectContract",
      "ContextWindow"
    ],
    "verified_functions": [
      "dispatch_effect",
      "rewrite",
      "reconcile"
    ],
    "verified_functions_count": 3,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "ResultWithoutContract"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
