{
  "schema_version": "1.3.0",
  "slug": "which-invariants-prevent-speculative-tool-call-pre-execution-from-committing-effects-out-of-causal-order",
  "title": "Which invariants prevent speculative tool-call pre-execution from committing effects out of causal order",
  "date_of_record": "2026 November 29",
  "scope": "Applies to agents that overlap tool-call execution with in-flight reasoning by speculatively pre-executing predicted calls under effect isolation and resolving them at commit time. Does not apply to strictly serialized tool loops, nor to idempotent read-only tools with no external side effects.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/which-invariants-prevent-speculative-tool-call-pre-execution-from-committing-effects-out-of-causal-order.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/which-invariants-prevent-speculative-tool-call-pre-execution-from-committing-effects-out-of-causal-order.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/which-invariants-prevent-speculative-tool-call-pre-execution-from-committing-effects-out-of-causal-order.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1325,
    "python_slice_tokens": 247,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "Speculative pre-execution is not the same as parallel tool dispatch. Parallel dispatch fires calls that the agent has *already decided* to commit; the only open question is ordering of results. Speculative pre-execution fires calls whose *argument bindings are still provisional*—the agent predicts that after reasoning step N it will call `write_config(path, ...",
    "what_was_observed": "A planning agent decomposed a migration task into steps that included `provision_bucket(name)` and `grant_reader(bucket, principal)`. During reasoning step 4, the model predicted both calls and launched them speculatively. `grant_reader` resolved first (the IAM API was warm); `provision_bucket` resolved 340 ms later against a cold control plane. Both ran inside isolated effect buffers keyed by speculative branch ID, ...",
    "condition_of_validity": "Speculative pre-execution is sound only when three conditions hold simultaneously: 1. **Every speculative call carries an explicit dependency set** derived from the reasoning graph (which prior steps must be *committed*, not merely *resolved*, before this call may commit). 2. **The commit resolver is a topological drain**, not a completion-order drain. A cal...",
    "decision_boundary": "The boundary is between **resolution readiness** and **commit readiness**. A speculative call is resolution-ready when its effect buffer is validated and its result is available; it is commit-ready only when every node in its transitive dependency set is *committed to the authoritative store and acknowledged*. These are different predicates over different st...",
    "operational_effect": "With a topological commit drain and epoch revalidation, the observed anomaly class disappears: grants cannot commit ahead of provisions, and stale-argument commits are converted into respeculations. The cost is throughput—speculative batches whose dependency graphs are deep will serialize at commit even when execution overlapped—but the effect ledger becomes..."
  },
  "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": "819c392a37bbb35fdc0c2f62e81d70c3df8c47f9431c11f5e0673e1dcfa8f6a0",
    "verified_classes": [
      "CommitOrderViolation",
      "SpeculativeCall",
      "TopologicalCommitDrain"
    ],
    "verified_functions": [
      "__init__",
      "register",
      "_frontier_committed",
      "drain"
    ],
    "verified_functions_count": 4,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "CommitOrderViolation"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
