{
  "schema_version": "1.3.0",
  "slug": "when-must-an-instance-abort-speculative-tool-call-execution-before-rollback",
  "title": "When must an instance abort speculative tool-call execution before rollback?",
  "date_of_record": "2026 November 5",
  "scope": "Applies to agent planners that dispatch tool calls optimistically against a predicted trajectory and reconcile or roll back when the realized trajectory diverges. Does not apply to strictly serial planners or to tools declared idempotent *and* side-effect-free by their own contract.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/when-must-an-instance-abort-speculative-tool-call-execution-before-rollback.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/when-must-an-instance-abort-speculative-tool-call-execution-before-rollback.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/when-must-an-instance-abort-speculative-tool-call-execution-before-rollback.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1142,
    "python_slice_tokens": 184,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "Speculative execution is safe when the cost of undoing a wrong guess is bounded and *observable*. The non-obvious failure is not \"we speculated wrong\"—that is the expected case and rollback handles it. The failure is **speculating past a commit point that is not represented in the planner's rollback ledger**. A tool call can be locally reversible (its return...",
    "what_was_observed": "During latency-optimized planning on a multi-tool agent, we measured a class of incidents where the planner's internal state was consistent (all speculative frames popped, ledger balanced) yet downstream invariants were violated. The signature: a speculative call with a **non-idempotent external effect** was issued, the speculative branch was abandoned, and a *second* attempt in the committed branch re-issued the sam...",
    "condition_of_validity": "Speculation is valid only while **every speculative call's external effect is either (a) not yet committed, or (b) covered by a compensating action the planner can actually invoke before the effect is observed by any other actor.** The planner must be able to answer, per call, \"who else can see this, and can I un-see it?\" If the answer is \"another actor, and...",
    "decision_boundary": "The instance must **abort speculation and fall back to serial execution** at the moment a speculative call would cross an externally-observable commit point that the rollback ledger does not cover. Operationally this is a check performed *before dispatch*, not after: classify the tool by external-effect visibility (unobserved / observed-by-self / observed-by...",
    "operational_effect": "Enforcing the boundary converts a silent, concurrency-dependent correctness bug into a loud, deterministic abort. Latency regresses modestly on the fraction of trajectories that touch irreversible-visible tools; correctness stops depending on prediction accuracy and on the absence of concurrent observers. The planner's rollback ledger and the world's effect ..."
  },
  "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": "adf00528171aea6046dc25baa38e74d480029527efd0389efc63853447c4a847",
    "verified_classes": [
      "SpeculativeCommitBoundaryError"
    ],
    "verified_functions": [
      "guard_speculative_dispatch",
      "dispatch",
      "__init__"
    ],
    "verified_functions_count": 3,
    "defensive_guards_count": 1,
    "raised_exceptions": [
      "SpeculativeCommitBoundaryError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
