{
  "schema_version": "1.3.0",
  "slug": "which-invariants-prevent-speculative-parallel-agent-plans-from-committing-side-effects-that-a-later-rollback-cannot-undo",
  "title": "Which invariants prevent speculative parallel agent plans from committing side effects that a later rollback cannot undo",
  "date_of_record": "2026 November 26",
  "scope": "Applies to orchestrators that launch multiple agent branches speculatively against shared external state (filesystems, APIs, message queues, databases) and reconcile by rollback-on-conflict. Does not apply to pure read-only fan-out or to branches whose effects are fully captured in an append-only log that is never externally observable.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/which-invariants-prevent-speculative-parallel-agent-plans-from-committing-side-effects-that-a-later-rollback-cannot-undo.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/which-invariants-prevent-speculative-parallel-agent-plans-from-committing-side-effects-that-a-later-rollback-cannot-undo.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/which-invariants-prevent-speculative-parallel-agent-plans-from-committing-side-effects-that-a-later-rollback-cannot-undo.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1975,
    "python_slice_tokens": 280,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "Speculative execution of parallel agent plans is only safe when the *observable effect* of a branch is decoupled from its *speculative commitment*. Most orchestrators conflate the two: they let each branch execute tools against live external systems, then \"roll back\" the loser by deleting files, reverting commits, or issuing compensating calls. This works on...",
    "what_was_observed": "A planner decomposed a task into three parallel branches (A: update billing record, B: update billing record via a different code path, C: reconcile audit log). All three ran speculatively against a live Postgres instance and an outbound email tool. A and B produced conflicting writes to the same row; C read a snapshot mid-flight and wrote an audit entry consistent with A's version. On conflict detection, the orchest...",
    "condition_of_validity": "Rollback-based speculative execution is valid only when all of the following hold simultaneously: - **Effect enumeration is closed.** The set of external effects a branch can produce is known before execution and every member has a defined, tested compensation. Agent tool surfaces with dynamic tool discovery, freeform shell access, or arbitrary HTTP egress v...",
    "decision_boundary": "Choose rollback-per-branch when: all tool surfaces are transactional or trivially compensable (pure compute, scratch filesystem, in-memory state), and no external observer can act on intermediate effects. Choose staged-commit (deferred effects) when: any branch touches an outbound channel (email, webhook, payment, ticket, pager), any tool surface is discover...",
    "operational_effect": "Teams that adopt rollback-per-branch without the closed-effect invariant observe a characteristic signature: conflict rates are low, rollback success rates are high, and yet incident volume rises with a specific shape — duplicate or contradictory customer-facing messages, audit logs with unauthorized intermediate states, and compensations that page humans af..."
  },
  "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": "ff5a244cddc449e16321474772d8d9852b228ab2dec9392ff730b3876d195000",
    "verified_classes": [
      "UnsafeSpeculativeCommit"
    ],
    "verified_functions": [
      "apply_winner",
      "reconcile"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 4,
    "raised_exceptions": [
      "UnsafeSpeculativeCommit"
    ],
    "sample_fail_closed_invariants": [
      "apply_winner called before reconciliation barrier committed"
    ],
    "stdlib_dependencies": [],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
