{
  "schema_version": "1.3.0",
  "slug": "what-structural-signals-indicate-speculative-branch-divergence-during-cost-aware-pruning-of-agent-trajectories-and-how-deterministic-replay-of-committ",
  "title": "What structural signals indicate speculative branch divergence during cost-aware pruning of agent trajectories, and how deterministic replay of committed paths exposes it",
  "date_of_record": "2026 November 21",
  "scope": "Applies to agent runtimes that execute multiple speculative reasoning branches (parallel candidate tool-call sequences) under a cost budget and prune them by predicted utility before committing one trajectory to durable state. Does not apply to single-path agents without speculative execution, nor to purely offline batch evaluation where no commit boundary exists.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/what-structural-signals-indicate-speculative-branch-divergence-during-cost-aware-pruning-of-agent-trajectories-and-how-deterministic-replay-of-committ.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/what-structural-signals-indicate-speculative-branch-divergence-during-cost-aware-pruning-of-agent-trajectories-and-how-deterministic-replay-of-committ.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/what-structural-signals-indicate-speculative-branch-divergence-during-cost-aware-pruning-of-agent-trajectories-and-how-deterministic-replay-of-committ.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2068,
    "python_slice_tokens": 314,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure this record isolates is not \"the pruner chose the wrong branch.\" That is a quality problem, recoverable by better scoring. The failure is **pruning-induced non-replayability**: the committed trajectory, when replayed from its logged inputs, does not reproduce the committed outputs because the pruner's cost model mutated shared state that the surv...",
    "what_was_observed": "A planner agent fans out three speculative branches at a decision node: branch A (query the inventory service, then synthesize), branch B (read from a warm cache, then synthesize), branch C (escalate to a human-tool stub). The cost-aware pruner estimates cost per branch by *partially executing* each to the first tool boundary and measuring latency and token spend. Branch B's partial execution warms a cache key that b...",
    "condition_of_validity": "The invariant that must hold for speculative scheduling to be replayable is: **the committed trajectory must be a function only of (a) its own logged inputs and (b) environment state that existed before the decision node was entered.** Any state produced by a pruned sibling that the committed branch consumes violates this, and the violation is undetectable f...",
    "decision_boundary": "The boundary is whether the cost model's measurement mechanism is allowed to *touch* the environment it measures. Two regimes: - **Probe-isolated pruning** (safe): pruning estimates cost from static features — schema complexity, historical latency distributions, token-count of the prompt, cache-hit probability from a read-only index. No tool is invoked. Comm...",
    "operational_effect": "When the isolation invariant is violated, the observable effect is a class of replay discrepancies that look like model nondeterminism but are actually environment leakage. Teams chase these by pinning sampling seeds and lowering temperature, which does nothing, because the divergence is in tool latency and cache state, not token selection. The committed tra..."
  },
  "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": "e5fcbf70ee24a6383ff43f5c7827f78d712daf50273e1b6933137bf5a91774f8",
    "verified_classes": [
      "ReplayIsolationViolation",
      "Snapshot",
      "Branch"
    ],
    "verified_functions": [
      "commit_and_verify",
      "capture"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "ReplayIsolationViolation"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "hashlib"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
