{
  "schema_version": "1.3.0",
  "slug": "in-what-scenarios-must-an-instance-reject-its-own-pruning-pass-when-a-self-edited-context-window-severs-a-reasoning-trace-from-its-tool-call-provenanc",
  "title": "In what scenarios must an instance reject its own pruning pass when a self-edited context window severs a reasoning trace from its tool-call provenance",
  "date_of_record": "2026 November 25",
  "scope": "Applies to any agent that rewrites its own context window mid-episode—deleting, summarizing, or reordering prior reasoning traces—while a multi-step tool-call chain is still open. Does not apply to append-only context growth, nor to external compaction performed between fully drained episodes.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/in-what-scenarios-must-an-instance-reject-its-own-pruning-pass-when-a-self-edited-context-window-severs-a-reasoning-trace-from-its-tool-call-provenanc.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/in-what-scenarios-must-an-instance-reject-its-own-pruning-pass-when-a-self-edited-context-window-severs-a-reasoning-trace-from-its-tool-call-provenanc.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/in-what-scenarios-must-an-instance-reject-its-own-pruning-pass-when-a-self-edited-context-window-severs-a-reasoning-trace-from-its-tool-call-provenanc.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1817,
    "python_slice_tokens": 348,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "There are two structurally different objects inside a context window, and pruning treats them as interchangeable at its peril. A **reasoning trace** is the natural-language chain of inference the model emitted (\"the file must be under `/var/log` because the earlier `find` returned nothing elsewhere\"). A **provenance record** is the paired evidence that the t...",
    "what_was_observed": "A file-remediation agent running a bounded loop (max 12 tool calls) was tasked with locating and patching a misconfigured service. At turn 7 its context reached 82% saturation and a pruning pass fired with a policy of \"drop reasoning traces older than 3 turns whose conclusions appear in a later turn.\" The trace at turn 4 read, in substance: *\"`grep -rn listen` returned `listen 8080` in `conf/a.ini` and `listen 9090` ...",
    "condition_of_validity": "The guardrail below is valid only when the agent maintains, for each retained conclusion, a resolvable pointer to the tool-call record that produced its inputs, and when that record carries a content hash so that a later contradiction can be checked against the *original* observation rather than a paraphrase. If provenance is not hash-bound—if the tool outpu...",
    "decision_boundary": "The decision is not \"prune or don't prune.\" It is a per-candidate check with three outcomes: - **Collapse** the trace into its later restatement *only if* the restatement carries the same `provenance_call_id` and content hash. The token savings are real and the join survives. - **Retain** the trace when it is the sole binding between a conclusion and a tool ...",
    "operational_effect": "With the join-check enforced, the turn-8 contradiction in the trace above resolves correctly: the retained turn-4 derivation carries `c_4f2a` and the assumption \"no env override,\" the turn-8 `SVC_CONFIG` output is matched against that assumption, the conflict is escalated, and the agent re-derives the target as `conf/b.ini`. Cost: roughly 400 extra tokens re..."
  },
  "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": "1b4ece10b8d2f10bb2726ff5c82fe3f9ca6b8d48fe5344dfe264b0b681b16910",
    "verified_classes": [
      "ProvenanceSeveranceError",
      "ToolRecord",
      "Conclusion",
      "PruneCandidate"
    ],
    "verified_functions": [
      "apply_pruning_pass",
      "self_edit",
      "content_hash"
    ],
    "verified_functions_count": 3,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "ProvenanceSeveranceError"
    ],
    "sample_fail_closed_invariants": [
      "self-edit rejected: fall back to whole-prefix summarization preserving provenance"
    ],
    "stdlib_dependencies": [
      "dataclasses",
      "hashlib"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
