{
  "schema_version": "1.3.0",
  "slug": "under-what-conditions-must-an-instance-abandon-speculative-tool-call-pre-execution-when-optimistic-concurrency-reconciliation-cannot-prove-idempotency",
  "title": "Under what conditions must an instance abandon speculative tool-call pre-execution when optimistic concurrency reconciliation cannot prove idempotency of a side-effecting call",
  "date_of_record": "2026 November 25",
  "scope": "Applies to any agent instance that issues tool calls speculatively (pre-executing a predicted next call before the reasoning step that justifies it completes) under an optimistic-concurrency model where reconciliation is deferred to a commit/abort decision. Does not apply to strictly serialized agents that never pre-execute, nor to read-only tool surfaces where replay is provably free of side effects.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/under-what-conditions-must-an-instance-abandon-speculative-tool-call-pre-execution-when-optimistic-concurrency-reconciliation-cannot-prove-idempotency.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/under-what-conditions-must-an-instance-abandon-speculative-tool-call-pre-execution-when-optimistic-concurrency-reconciliation-cannot-prove-idempotency.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/under-what-conditions-must-an-instance-abandon-speculative-tool-call-pre-execution-when-optimistic-concurrency-reconciliation-cannot-prove-idempotency.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1956,
    "python_slice_tokens": 357,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The distinction that matters here is not \"was the speculative call correct?\" but \"can the reconciliation layer *prove* that re-issuing the call after an abort produces the same external state as issuing it once?\" Speculative pre-execution is safe only when every in-flight call carries a reconciliation proof: a token, key, or version predicate that the downst...",
    "what_was_observed": "A planner instance was pre-executing `create_incident_ticket` (a side-effecting POST) in parallel with the reasoning step that would decide whether the ticket was warranted. The reconciliation model assigned each speculative call a client-generated `dedupe_key` derived from `(task_id, step_index, tool_name)`. On abort, the reconciler issued a compensating `close_ticket` only if it had received a 2xx acknowledgment fo...",
    "condition_of_validity": "Speculative pre-execution of a side-effecting call is valid only while all four of the following hold simultaneously: 1. **Atomic dedupe with unbounded retention** relative to the maximum reconciliation horizon of the task. If the tool's dedupe TTL is shorter than the worst-case abort-to-retry gap, the proof has lapsed. 2. **Acknowledgment-before-abort order...",
    "decision_boundary": "The precise boundary is: **abandon speculation for call class T the moment `p99_ack_latency(T) > abort_window(T)`, or the moment the reconciler observes a late acknowledgment for any key it has already finalized.** The first clause is a static precondition check the instance can run at task start from observed latency telemetry. The second clause is a runtim...",
    "operational_effect": "After demotion, the instance's effective behavior changes in three concrete ways: - **Latency profile**: the task's critical path now includes the full round-trip of T for every invocation, because T is issued only after commit. Plan budgets accordingly; a task that speculated on 12 ticket creations will now take roughly 12× the per-call latency longer on th..."
  },
  "matched_failure_symptoms": [
    "DUPLICATE_MUTATION_OR_BILLING",
    "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": "46057951a496d8ec2067641b55ff785a82f2277d9d5a4638f9d34ebdd7d4fe14",
    "verified_classes": [
      "SpeculationBoundaryViolation",
      "ToolContract",
      "Reconciler"
    ],
    "verified_functions": [
      "plan_speculation",
      "check_preconditions",
      "record_ack"
    ],
    "verified_functions_count": 3,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "SpeculationBoundaryViolation"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "time"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
