{
  "schema_version": "1.3.0",
  "slug": "under-what-conditions-must-an-instance-refuse-to-speculate-past-a-non-idempotent-tool-call-without-a-proven-compensator",
  "title": "Under what conditions must an instance refuse to speculate past a non-idempotent tool call without a proven compensator",
  "date_of_record": "2026 November 25",
  "scope": "Applies to agents that dispatch multiple tool calls speculatively (in parallel or ahead of a confirmed plan) under optimistic concurrency, where at least one call mutates external state. Does not apply to read-only tool suites or to single-call-then-verify serial loops.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/under-what-conditions-must-an-instance-refuse-to-speculate-past-a-non-idempotent-tool-call-without-a-proven-compensator.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/under-what-conditions-must-an-instance-refuse-to-speculate-past-a-non-idempotent-tool-call-without-a-proven-compensator.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/under-what-conditions-must-an-instance-refuse-to-speculate-past-a-non-idempotent-tool-call-without-a-proven-compensator.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1607,
    "python_slice_tokens": 306,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "Speculative execution and optimistic concurrency are not the same guarantee. Speculation is a *scheduling* decision: the agent issues call B before call A's result is known, betting that B's precondition will survive. Optimistic concurrency is a *commit* discipline: the agent accepts a write only if a version/etag/compare-and-swap still matches at commit tim...",
    "what_was_observed": "A planning agent decomposed a \"provision staging environment\" task into three tool calls: `reserve_quota(n)`, `create_bucket(name)`, and `attach_policy(bucket, role)`. It speculated all three in parallel to cut latency, treating `attach_policy` as the risky one and gating it behind a version check on the bucket object. The quota reservation returned success with a 30-second lease. The bucket creation returned success...",
    "condition_of_validity": "Speculation past a mutating call is valid only when all of the following hold at issue time: 1. **Idempotency or proven inverse.** Either the call carries a client-supplied idempotency key and the downstream honors it, or a compensator exists whose preconditions are a *subset* of the call's postconditions. `delete_bucket` fails this: its precondition (empty)...",
    "decision_boundary": "The boundary is crossed at the moment the agent schedules a mutating call whose compensator's precondition is *weakened* by any other call in the same speculative batch. Concretely: build the batch as a graph where each mutating call points to its compensator, and each compensator carries a precondition set. Reject the batch if any compensator's precondition...",
    "operational_effect": "Agents that speculate without compensation-graph analysis produce a specific signature: orphaned resources whose cleanup requires a precondition the speculation itself violated, lease expiries that refund capacity still in use, and retry loops that burn the token budget on compensators that can never succeed. The downstream damage is delayed — it appears at ..."
  },
  "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": "b128803ec1eed8971b063f288ebba1049e1ead189c08ed275e56870396fe0a9b",
    "verified_classes": [
      "SpeculationBoundaryError",
      "ToolCall",
      "Compensator"
    ],
    "verified_functions": [
      "validate_speculative_batch",
      "run_compensation"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 4,
    "raised_exceptions": [
      "SpeculationBoundaryError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
