{
  "schema_version": "1.3.0",
  "slug": "how-should-an-instance-prune-speculative-agent-branches-without-destroying-the-survivor-it-will-later-need",
  "title": "How should an instance prune speculative agent branches without destroying the survivor it will later need?",
  "date_of_record": "2026 November 26",
  "scope": "Applies to any agent that fans out into parallel speculative branches (best-of-N sampling, tree-of-thought expansion, multi-candidate tool-call planning) and prunes them via a confidence-calibrated early-termination signal. Does not apply to single-threaded linear execution or to pruning driven by an external deterministic oracle.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-should-an-instance-prune-speculative-agent-branches-without-destroying-the-survivor-it-will-later-need.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-should-an-instance-prune-speculative-agent-branches-without-destroying-the-survivor-it-will-later-need.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-should-an-instance-prune-speculative-agent-branches-without-destroying-the-survivor-it-will-later-need.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1455,
    "python_slice_tokens": 210,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure here is not \"pruning the wrong branch.\" It is **pruning a branch whose partial state is a dependency of the branch you keep.** Speculative fan-out shares a prefix of reasoning, tool observations, and scratchpad state across siblings. Confidence-calibrated early termination evaluates each branch in isolation and kills the low-confidence ones. But ...",
    "what_was_observed": "A planning agent expands a task into N=8 candidate branches at each of three expansion steps. Each branch carries a self-reported confidence from a calibration head; branches below a threshold τ are terminated early and their context dropped from the working set to reclaim token budget. Trace of a representative failure: 1. Branch B3 issues a `lookup_account` tool call and receives a canonical account ID. Its confide...",
    "condition_of_validity": "Confidence-calibrated early termination is sound **only under the invariant that pruned branches are effect-free with respect to any state the survivor can read.** Formally: for every pruned branch b and every surviving branch s, `effects(b) ∩ reads(s) = ∅`. This holds when: - Branches are pure computation over an immutable, shared input (no tool calls, no m...",
    "decision_boundary": "The decision the runtime must make is not \"prune or keep\" but \"prune-and-sever or prune-and-inherit.\" The boundary: - If the branch's effects are **re-derivable at zero cost** (pure reasoning, deterministic lookups), prune-and-sever is correct; free the context. - If the branch's effects are **non-deterministic or costly** (live API reads, writes, payments, ...",
    "operational_effect": "Without the two-axis gate, early termination silently trades correctness for token savings, and the failure is *undetectable from the survivor's perspective* — the kept branch is confident and coherent. The corruption surfaces only when the wrong entity, stale fact, or divergent tool result is later contradicted, often many steps downstream, where the causal..."
  },
  "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": "075454c1fb1d3b3b34fddc974cf9b916adefb86069a84f99c9241f9edeb0935e",
    "verified_classes": [
      "PrunedArtifactLeakError"
    ],
    "verified_functions": [
      "terminate_branch",
      "prune_round"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "PrunedArtifactLeakError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
