{
  "schema_version": "1.3.0",
  "slug": "what-structural-signals-indicate-speculative-tool-call-divergence-under-optimistic-concurrency-in-agent-execution-loops",
  "title": "What structural signals indicate speculative tool-call divergence under optimistic concurrency in agent execution loops",
  "date_of_record": "2026 November 23",
  "scope": "Applies to agents that issue tool calls speculatively (pipelining or pre-executing calls whose preconditions depend on not-yet-returned sibling results) under optimistic concurrency, and must reconcile conflicting effects at commit. Does not apply to strictly serialized single-call agents or to read-only tool surfaces with no observable side effects.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/what-structural-signals-indicate-speculative-tool-call-divergence-under-optimistic-concurrency-in-agent-execution-loops.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/what-structural-signals-indicate-speculative-tool-call-divergence-under-optimistic-concurrency-in-agent-execution-loops.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/what-structural-signals-indicate-speculative-tool-call-divergence-under-optimistic-concurrency-in-agent-execution-loops.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1767,
    "python_slice_tokens": 259,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The common framing of speculative execution assumes the hard problem is *detecting* a conflict: if the world changed under the speculation, abort and retry. In agent systems this is the wrong distinction. The binding failure is that **the agent's own reasoning state has already absorbed the speculative result before the conflict is observable**. Optimistic c...",
    "what_was_observed": "A planning agent was given a task requiring three tool calls: `reserve_inventory(sku)`, `compute_shipping(order)`, and `charge_card(order)`. The orchestrator speculatively dispatched `reserve_inventory` and `compute_shipping` concurrently, both keyed on an `order_version` read at plan time (v41). `reserve_inventory` returned at t=340ms with a reservation token bound to v41. `compute_shipping` returned at t=610ms. At ...",
    "condition_of_validity": "The optimistic-concurrency strategy is sound only under the invariant: > *No dependent emission may be committed to the durable transcript until all speculative preconditions it transitively depends on have passed their version check.* Formally, for every tool call `c` emitted at time `t`, let `D(c)` be the set of speculative calls whose outputs appear (dire...",
    "decision_boundary": "The boundary between \"retry is safe\" and \"retry is contaminated\" is the presence of a dependent emission in the transcript at rollback time. Three regimes: - **No dependent emission, version fail**: retry from the pre-speculation checkpoint. Safe. Cost is one round-trip. - **Dependent emission, version fail, transcript not yet committed**: discard the specul...",
    "operational_effect": "The operational consequence is that speculative tool execution in agents requires a *transcript-level* concurrency control that mirrors the effect-level one, and the two must share a commit barrier. Concretely: buffer assistant turns that depend on speculative outputs in a staging area; append to the durable transcript only after the corresponding version ch..."
  },
  "matched_failure_symptoms": [
    "LOST_UPDATE_OR_RACE_CONDITION"
  ],
  "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": "b2269e868cd42f7b3bc35969a08d064a8b3963db2a224b3bdd59a33713ebcdfa",
    "verified_classes": [
      "SpeculativeDivergenceError",
      "SpeculativeCall",
      "StagedTurn",
      "SpeculativeOrchestrator"
    ],
    "verified_functions": [
      "__init__",
      "dispatch",
      "emit_dependent",
      "commit"
    ],
    "verified_functions_count": 4,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "SpeculativeDivergenceError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
