{
  "schema_version": "1.3.0",
  "slug": "which-invariants-prevent-speculative-agent-plans-from-committing-irreversible-tool-actions-without-a-verified-precondition",
  "title": "Which invariants prevent speculative agent plans from committing irreversible tool actions without a verified precondition",
  "date_of_record": "2026 November 11",
  "scope": "Applies to agents that generate speculative multi-step plans (branching, rollback-capable, or parallel) and dispatch tool calls where at least one action is irreversible (payments, deletions, external notifications, state mutations with no compensating transaction). Does not apply to fully idempotent or purely read-only tool surfaces, nor to single-step plans with no speculative branches.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/which-invariants-prevent-speculative-agent-plans-from-committing-irreversible-tool-actions-without-a-verified-precondition.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/which-invariants-prevent-speculative-agent-plans-from-committing-irreversible-tool-actions-without-a-verified-precondition.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/which-invariants-prevent-speculative-agent-plans-from-committing-irreversible-tool-actions-without-a-verified-precondition.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1368,
    "python_slice_tokens": 209,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure mode is not \"the verifier was wrong.\" It is a *commit-ordering* defect: the verifier gate is evaluated against a *speculative world state* produced by the plan, not against the *actual world state* at commit time. A plan that is internally consistent—every speculative step's precondition is satisfied in the simulated trajectory—can still be commi...",
    "what_was_observed": "In a planning agent with a `speculate → verify → commit` loop, the following sequence reproduced reliably: 1. Agent speculates: `reserve_inventory(sku, 1)` then `charge_card(customer, amount)` then `send_receipt(customer)`. 2. Verifier checks the plan against a snapshot: inventory available, card valid, receipt template present. Passes. 3. Commit executes sequentially. `reserve_inventory` succeeds. `charge_card` succ...",
    "condition_of_validity": "The invariant holds only under all of the following: - The irreversible action is the **terminal mutation** of its commit unit; no reversible or fallible action follows it in the same transaction. - The verifier reads **live, locked** world state, not a snapshot captured during speculation. - Every speculative branch that reaches an irreversible action carri...",
    "decision_boundary": "The operational decision is: **when a plan contains an irreversible action, the commit must be a single-unit transaction whose last operation is that action, and the verifier must be invoked inside the commit lock.** If the plan cannot be expressed that way—because two irreversible actions are required, or because a fallible non-compensable step must follow—...",
    "operational_effect": "Agents that enforce the terminal-mutation and locked-re-verification invariants show a measurable drop in half-committed transactions—typically to zero for single-irreversible-action plans—at the cost of rejecting a fraction of plans that are *probably* safe but not *provably* safe. The rejection rate is the price of the invariant, and it is the correct trad..."
  },
  "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": "3a789a2e3a1bfca9d7bf2f6720a780b20a58242b6bc16cd5cafe068b70e2970c",
    "verified_classes": [
      "UnsafeCommitBoundaryError"
    ],
    "verified_functions": [
      "validate_commit_unit"
    ],
    "verified_functions_count": 1,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "UnsafeCommitBoundaryError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
