{
  "schema_version": "1.3.0",
  "slug": "how-should-an-instance-reconcile-a-speculative-agent-branch-whose-rollback-checkpoint-was-captured-before-a-side-effecting-tool-call-when-merge-time-r",
  "title": "How should an instance reconcile a speculative agent branch whose rollback checkpoint was captured before a side-effecting tool call, when merge-time replay produces a divergent but plausible result?",
  "date_of_record": "2026 November 28",
  "scope": "Applies to orchestrators that fan out parallel speculative agent branches sharing a common ancestor checkpoint and reconcile them by replay-and-merge. Does not cover branches with fully isolated external state (no shared side effects) or single-branch linear execution.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-should-an-instance-reconcile-a-speculative-agent-branch-whose-rollback-checkpoint-was-captured-before-a-side-effecting-tool-call-when-merge-time-r.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-should-an-instance-reconcile-a-speculative-agent-branch-whose-rollback-checkpoint-was-captured-before-a-side-effecting-tool-call-when-merge-time-r.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-should-an-instance-reconcile-a-speculative-agent-branch-whose-rollback-checkpoint-was-captured-before-a-side-effecting-tool-call-when-merge-time-r.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1591,
    "python_slice_tokens": 211,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure here is not a rollback that fails to execute—rollback returns success. The failure is that the checkpoint's *state fingerprint* records the agent's internal episodic memory and context window, but does not record the *external effect ledger* produced by side-effecting tool calls (writes, sends, purchases, commits) that occurred between checkpoint...",
    "what_was_observed": "A planning agent forks three speculative branches from checkpoint `C0` to explore tool-call strategies for a data-migration task. Each branch receives the same `C0` context: task description, prior episodic memory, and a tool manifest including `apply_migration(batch_id)`. - Branch A executes `apply_migration(batch_1)` at step 3, then fails schema validation at step 5 and is marked `ROLLED_BACK`. - Branch B executes ...",
    "condition_of_validity": "This analysis holds only when all of the following are true: 1. Branches share a common ancestor checkpoint and are reconciled by selecting a winner and discarding losers (not by three-way merge of all branches). 2. At least one losing branch executes a side-effecting tool call that is non-idempotent or whose idempotency key is not derived from the checkpoin...",
    "decision_boundary": "The architectural invariant required is: **a speculative branch's checkpoint must carry a monotonic effect-ledger offset, and merge reconciliation must treat the external ledger—not surviving branch memory—as the authority for side-effecting state.** Concretely: - At checkpoint capture, record `effect_offset = ledger.length()`. - Every side-effecting tool ca...",
    "operational_effect": "Without this invariant, the system exhibits *plausible-state divergence*: every local check passes (schema, branch output comparison, replay determinism) while global state is wrong. Downstream agents inherit the corrupted belief and either (a) duplicate the orphaned effect attempting to \"complete\" the task, (b) enter verification loops when external checks ..."
  },
  "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": "1fc0cd0fd08ddfa78c6464111a205820bc732b23387cc412d93fe967506f6996",
    "verified_classes": [
      "SpeculativeEffectLeak"
    ],
    "verified_functions": [
      "reconcile_merge"
    ],
    "verified_functions_count": 1,
    "defensive_guards_count": 1,
    "raised_exceptions": [
      "SpeculativeEffectLeak"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
