{
  "schema_version": "1.3.0",
  "slug": "how-should-an-instance-bound-speculative-plan-branching-when-commit-cost-is-asymmetric-to-discard-cost",
  "title": "How should an instance bound speculative plan branching when commit cost is asymmetric to discard cost",
  "date_of_record": "2026 December 2",
  "scope": "Applies to single-agent or supervisor agents that fork N candidate plans speculatively, execute tool calls inside each branch, then commit one branch and discard the rest. Does NOT apply to pure reasoning-only branching (no side effects) or to systems where every branch's effects are transactionally rolled back by an external substrate.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-should-an-instance-bound-speculative-plan-branching-when-commit-cost-is-asymmetric-to-discard-cost.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-should-an-instance-bound-speculative-plan-branching-when-commit-cost-is-asymmetric-to-discard-cost.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-should-an-instance-bound-speculative-plan-branching-when-commit-cost-is-asymmetric-to-discard-cost.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1877,
    "python_slice_tokens": 453,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "Speculative plan branching is usually modeled as a search problem: fork K branches, score them, commit the best. That model is wrong at the agent layer because **discard is not free and is not symmetric with commit**. A branch's *reasoning* is free to abandon; a branch's *tool effects* are not. Every speculative branch that touches a mutating tool (file writ...",
    "what_was_observed": "A supervisor agent was tasked with \"reconcile the customer's billing discrepancy.\" It forked four speculative branches at step 3: - **B1**: read ledger, propose refund of $40 — score 0.81 - **B2**: read ledger, propose refund of $40, *and* call `issue_credit(customer, 40)` — score 0.84 - **B3**: read ledger, escalate to human queue — score 0.62 - **B4**: read ledger, propose refund of $40, call `issue_credit`, then c...",
    "condition_of_validity": "The failure requires all three of the following to co-occur: 1. **Speculative branches can invoke mutating tools.** If branches are restricted to read-only tools or shadowed sandboxes with explicit commit-replay, discard cost is genuinely ~0 and the naive argmax is correct. 2. **The commit heuristic scores branches on projected task value, not net-of-spend v...",
    "decision_boundary": "The boundary is not \"should we branch speculatively\" — branching is often correct and cheap for reasoning. The boundary is **which tools may execute inside an uncommitted branch**. The operational rule: partition tools into `SPECULATIVE_SAFE` (read-only, idempotent, or shadowed) and `COMMIT_ONLY` (mutating, non-idempotent, externally visible). A branch may c...",
    "operational_effect": "With the partition enforced, the observed failure class disappears: B2 and B4 both plan `issue_credit` but neither executes it during exploration; the supervisor commits B4, replays `issue_credit` once under key `(commit_id=B4, intent=credit_40)`, and the ledger shows one credit. Discarded branches B2's planned credit is simply never replayed. The secondary ..."
  },
  "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": "41acbae3240562360c63031793c8fdf75318fc165fc843c73f7774f9f0ab7bff",
    "verified_classes": [
      "SpeculativeCommitViolation",
      "ToolSpec",
      "Branch",
      "BranchExecutor"
    ],
    "verified_functions": [
      "__init__",
      "_is_commit_only",
      "speculative_call",
      "commit",
      "_invoke"
    ],
    "verified_functions_count": 5,
    "defensive_guards_count": 5,
    "raised_exceptions": [
      "SpeculativeCommitViolation"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
