{
  "schema_version": "1.3.0",
  "slug": "in-what-scenarios-must-an-instance-abort-a-speculative-tool-call-after-optimistic-pre-execution-reveals-a-conflicting-side-effect",
  "title": "In what scenarios must an instance abort a speculative tool call after optimistic pre-execution reveals a conflicting side effect",
  "date_of_record": "2026 November 18",
  "scope": "Applies to agent runtimes that speculatively pre-execute tool calls against a read-versioned state snapshot, then commit them under optimistic concurrency control (OCC). Does not apply to tool calls guarded by pessimistic locks acquired before dispatch, nor to purely idempotent read-only tools, which are safe to replay unconditionally.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/in-what-scenarios-must-an-instance-abort-a-speculative-tool-call-after-optimistic-pre-execution-reveals-a-conflicting-side-effect.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/in-what-scenarios-must-an-instance-abort-a-speculative-tool-call-after-optimistic-pre-execution-reveals-a-conflicting-side-effect.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/in-what-scenarios-must-an-instance-abort-a-speculative-tool-call-after-optimistic-pre-execution-reveals-a-conflicting-side-effect.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1443,
    "python_slice_tokens": 211,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure mode is not \"the tool call failed.\" It is \"the tool call succeeded against a snapshot that was already stale at dispatch time, and the success is indistinguishable from a valid commit until the read-set is revalidated.\" Speculative pre-execution deliberately decouples *execution* from *commit*: the runtime fires a tool call optimistically while t...",
    "what_was_observed": "An agent issued a speculative `transfer_funds(source, dest, amount)` against an account snapshot read at version V0 (balance: 500, limit: 500). Concurrently, a second agent committed a debit of 300 against the same account, advancing to V1 (balance: 200). The speculative call executed against V0, computed `500 - 400 = 100 >= 0`, and returned success. At commit-time revalidation, the read-set `{balance@V0}` no longer ...",
    "condition_of_validity": "Speculative pre-execution with OCC is valid only when **all three** hold: 1. **Effect containment.** Every speculative tool call is either (a) side-effect-free, or (b) dispatched through a transactional outbox whose commit is gated on OCC revalidation, so an abort suppresses the external dispatch rather than merely rolling back local state. If the tool reach...",
    "decision_boundary": "The boundary is drawn at the point of external observability, not at the point of local commit: - **Before external dispatch:** OCC conflict → abort, discard speculative result, re-read, re-dispatch. Cost: one round trip. Safe. - **After external dispatch, conflict detected:** OCC conflict → abort local commit, but the external effect is now an orphan. The r...",
    "operational_effect": "Runtimes that treat OCC conflict as a pure rollback silently leak external side effects and misreport them as clean aborts. The observable symptom is a ledger that reconciles locally but diverges from the external processor under concurrent load, with divergence appearing only in the write-skew window (typically high-contention accounts, shared quotas, and c..."
  },
  "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": "a79ce193dc12d73be45cadada080b87ec49fff9f206e09e8e8c347e283e0510c",
    "verified_classes": [
      "SpeculativeCommitConflict"
    ],
    "verified_functions": [
      "commit_speculative_call"
    ],
    "verified_functions_count": 1,
    "defensive_guards_count": 4,
    "raised_exceptions": [
      "SpeculativeCommitConflict"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
