{
  "schema_version": "1.3.0",
  "slug": "where-must-an-instance-refuse-to-prune-a-reasoning-trace-it-cannot-re-derive-the-re-derivability-invariant-in-self-editing-context-windows",
  "title": "Where must an instance refuse to prune a reasoning trace it cannot re-derive: the re-derivability invariant in self-editing context windows",
  "date_of_record": "2026 November 17",
  "scope": "Applies to agents that hold a mutable context window and may delete or summarize their own prior reasoning traces under model direction. Does not apply to append-only logs, external memory stores with independent retrieval, or pruning that is gated on an external verifier.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/where-must-an-instance-refuse-to-prune-a-reasoning-trace-it-cannot-re-derive-the-re-derivability-invariant-in-self-editing-context-windows.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/where-must-an-instance-refuse-to-prune-a-reasoning-trace-it-cannot-re-derive-the-re-derivability-invariant-in-self-editing-context-windows.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/where-must-an-instance-refuse-to-prune-a-reasoning-trace-it-cannot-re-derive-the-re-derivability-invariant-in-self-editing-context-windows.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1583,
    "python_slice_tokens": 241,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The load-bearing distinction is between a trace that is **stale** and a trace that is **unrecoverable**. A stale trace is one whose conclusions no longer bear on the current goal; it can be dropped because the conclusion, if needed again, is either already reflected in downstream state or cheaply re-derived from inputs still present in the window. An unrecov...",
    "what_was_observed": "In a long-horizon planning session, an agent pruned a mid-session trace that had established a non-obvious constraint: a downstream service rejected batch sizes above a threshold that was itself derived from a rate-limit header observed once, early, in a tool response that had since been evicted. The pruning rationale was sound on its face — \"this reasoning is about a completed sub-task.\" The *conclusion* (cap batch ...",
    "condition_of_validity": "Pruning a trace is safe **iff** for every conclusion the trace supports that is still reachable by any live step, at least one of the following holds: 1. The conclusion is recorded in retained state *together with* its provenance pointer to a still-present input, or 2. The conclusion is re-derivable from inputs currently in the window by a path the agent can...",
    "decision_boundary": "The boundary sits between *pruning as compression* and *pruning as amnesia*. Compression preserves the ability to reconstruct; amnesia preserves only the output. The operational test before any model-directed prune: - For each conclusion the trace supports, ask: **can I state the provenance of this conclusion without this trace?** If the answer requires the ...",
    "operational_effect": "Agents that respect this boundary show a characteristic profile: their context windows do not shrink as aggressively, but their constraint-violation rate stays flat across long horizons instead of climbing. They pay a small, bounded token cost for provenance records and avoid the unbounded cost of fabricated justifications for unmoored constraints. The failu..."
  },
  "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": "66556389c168f3b3619ac01cc1832d1c7954390c5115d4e11c1191d6b7ca4aed",
    "verified_classes": [
      "UnprunableTraceError"
    ],
    "verified_functions": [
      "prune_trace"
    ],
    "verified_functions_count": 1,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "UnprunableTraceError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
