{
  "schema_version": "1.3.0",
  "slug": "which-invariants-prevent-speculative-tool-call-divergence-from-committing-irreversible-side-effects-across-optimistic-multi-agent-execution",
  "title": "Which invariants prevent speculative tool-call divergence from committing irreversible side effects across optimistic multi-agent execution",
  "date_of_record": "2026 November 26",
  "scope": "Applies to multi-agent systems where one or more worker agents speculatively invoke tools (writes, sends, charges, deploys) ahead of an auditor/verifier agent's consistency confirmation, under an optimistic-execution model. Does not apply to strictly serialized tool-call pipelines where every side effect is gated on a synchronous verifier return, nor to read-only tool surfaces.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/which-invariants-prevent-speculative-tool-call-divergence-from-committing-irreversible-side-effects-across-optimistic-multi-agent-execution.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/which-invariants-prevent-speculative-tool-call-divergence-from-committing-irreversible-side-effects-across-optimistic-multi-agent-execution.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/which-invariants-prevent-speculative-tool-call-divergence-from-committing-irreversible-side-effects-across-optimistic-multi-agent-execution.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2818,
    "python_slice_tokens": 483,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure we are isolating is not \"the verifier disagreed with the worker.\" That is expected and recoverable. The failure is **speculative side-effect commitment divergence**: a worker agent emits a tool call whose *effect* is observable outside the agent boundary (a POST, a transfer, a deploy, a message send) *before* the consistency verifier has confirme...",
    "what_was_observed": "A three-agent topology: **Planner** (decomposes task into tool-call intents), **Worker** (executes intents optimistically, streaming results), **Auditor** (re-derives the expected precondition state from its own retrieval and confirms or rejects). The Worker was configured to \"fire on intent\" to reduce latency — it did not block on Auditor confirmation for tool calls classified as *low-risk*, where low-risk was defin...",
    "condition_of_validity": "Optimistic speculative tool-calling is sound only when **all three** of the following invariants hold simultaneously. Drop any one and the divergence window reopens. **Invariant 1 — Effect-class partition is conservative and monotone.** Every tool must be partitioned into `REVERSIBLE`, `COMPENSABLE`, and `IRREVERSIBLE`. `REVERSIBLE` may be speculated freely....",
    "decision_boundary": "The runtime must decide, per tool call, between **speculate-and-verify** and **block-and-verify**. The decision is not a latency knob; it is a correctness boundary. The boundary is: - If `effect_class == IRREVERSIBLE` **or** `inverse_is_total == False` **or** `verifier_read_independence == UNPROVEN` → **block**. The Worker must not emit the call until the Au...",
    "operational_effect": "When the three invariants hold jointly, the system gains a bounded, auditable speculation window: divergent tool calls either never commit (blocked class) or commit with a guaranteed, total, idempotent inverse that fires automatically inside the lease. The operational signature is that **every committed irreversible effect has a verifier witness strictly new..."
  },
  "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": "f32febe61bd7562d06aa5d97dbb68b67cc28cacac97dc5adf4d53bfaa599a5d4",
    "verified_classes": [
      "EffectClass",
      "SpeculationRefused",
      "DivergenceLeaseExpired",
      "ToolSpec",
      "CommitRecord",
      "CommitLedger"
    ],
    "verified_functions": [
      "speculate",
      "record",
      "on_divergence"
    ],
    "verified_functions_count": 3,
    "defensive_guards_count": 7,
    "raised_exceptions": [
      "DivergenceLeaseExpired",
      "SpeculationRefused"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "enum",
      "time",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
