{
  "schema_version": "1.3.0",
  "slug": "when-must-an-instance-abandon-a-speculative-branch-before-its-tool-call-effects-are-reconciled",
  "title": "When must an instance abandon a speculative branch before its tool-call effects are reconciled",
  "date_of_record": "2026 November 30",
  "scope": "Applies to orchestrators that fork a planning agent into N speculative branches which each emit tool calls against shared external state, then select a winning branch and roll back the losers. Does not cover pure-reasoning speculation with no side effects, nor single-branch retry loops.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/when-must-an-instance-abandon-a-speculative-branch-before-its-tool-call-effects-are-reconciled.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/when-must-an-instance-abandon-a-speculative-branch-before-its-tool-call-effects-are-reconciled.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/when-must-an-instance-abandon-a-speculative-branch-before-its-tool-call-effects-are-reconciled.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1701,
    "python_slice_tokens": 291,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "There are two kinds of speculative work an agent can do, and they diverge at the moment of commit. *Read-only speculation* — forking a planner to explore alternate tool-call sequences whose effects are idempotent reads — can be rolled back by simply discarding the branch's context. *Effectful speculation* — where a branch calls `send_email`, `transfer_funds`...",
    "what_was_observed": "An orchestrator forked a task (\"reconcile the dueling invoices from vendor A and vendor B\") into three branches. Branch 1 (B1) planned to call `issue_credit(vendor=A, amount=4200)`, then `close_dispute(A)`. Branch 2 (B2) planned to call `issue_credit(vendor=B, amount=4200)`. Branch 3 (B3) planned to escalate to a human. All three dispatched their first tool call in parallel because the orchestrator's speculative sche...",
    "condition_of_validity": "Speculative rollback is sound only under the invariant: **for every branch, the set of dispatched effects is a subset of the set of effects recorded in the orchestrator's durable effect journal, and the journal is consulted at commit time.** This requires three conditions to hold simultaneously: 1. **Effect journaling precedes dispatch.** A branch must write...",
    "decision_boundary": "At commit time, for each losing branch, the orchestrator must decide: *discard* or *compensate*. The boundary is determined by the journal, not by the branch's self-report. - If the journal shows **no dispatch** for a branch → discard is safe. The branch is inert. - If the journal shows **dispatch with confirmed ack** → the branch is a live actor. The orches...",
    "operational_effect": "When this invariant is enforced, speculative execution gains a hard property: **the committed state record is a conservative over-approximation of the external ledger, with every discrepancy either zero or explicitly flagged as reconciliation-required.** Duplicates cannot be manufactured by the system's own bookkeeping, because no effect can land without a j..."
  },
  "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": "1e31fe02be51c2445401a25bbdb3e0d49bae03e944e0b1b22f309842c94332b6",
    "verified_classes": [
      "UnreconciledSpeculativeEffect",
      "EffectStatus",
      "JournalEntry",
      "EffectJournal"
    ],
    "verified_functions": [
      "commit_winner",
      "record_intent",
      "confirm",
      "entries_for"
    ],
    "verified_functions_count": 4,
    "defensive_guards_count": 1,
    "raised_exceptions": [
      "UnreconciledSpeculativeEffect"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "enum",
      "time",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
