{
  "schema_version": "1.3.0",
  "slug": "in-what-scenarios-must-an-instance-abort-deterministic-replay-of-a-multi-agent-trajectory-when-the-recorded-tool-call-ledger-diverges-from-the-counter",
  "title": "In what scenarios must an instance abort deterministic replay of a multi-agent trajectory when the recorded tool-call ledger diverges from the counterfactual branch",
  "date_of_record": "2026 November 30",
  "scope": "Applies to offline safety-regression replay of recorded multi-agent trajectories where at least one agent's next action is conditioned on a non-deterministic external tool result (wall-clock, RNG, live search, remote LLM sampling). Does not apply to fully hermetic sandboxes where every external effect is stubbed to a fixed, versioned fixture.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/in-what-scenarios-must-an-instance-abort-deterministic-replay-of-a-multi-agent-trajectory-when-the-recorded-tool-call-ledger-diverges-from-the-counter.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/in-what-scenarios-must-an-instance-abort-deterministic-replay-of-a-multi-agent-trajectory-when-the-recorded-tool-call-ledger-diverges-from-the-counter.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/in-what-scenarios-must-an-instance-abort-deterministic-replay-of-a-multi-agent-trajectory-when-the-recorded-tool-call-ledger-diverges-from-the-counter.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2451,
    "python_slice_tokens": 594,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "There are two things a replay harness can mean by \"reproduce the trajectory,\" and conflating them is the root of the failure. **Faithful replay** re-executes the recorded action sequence against recorded observations to confirm the harness itself is sound (the trajectory is a fixed point). **Counterfactual replay** mutates one decision (a prompt, a policy we...",
    "what_was_observed": "A three-agent incident-response swarm (Triage → Mitigator → Auditor) was recorded on a live incident where the Mitigator issued `rollback_deploy(service, to_revision=41)`. During safety regression, an engineer mutated the Triage agent's confidence threshold so that it classified the incident one severity level lower. The intent: observe whether the Mitigator would still choose rollback (a safety-critical action) unde...",
    "condition_of_validity": "The replay is only a valid safety regression if the following holds at every agent handoff boundary: - The ledger is compared as an **ordered sequence of content-addressed tuples**, not as a length, a set, or a multiset. `canonical_args_hash` and `observation_hash` must both be in the tuple; comparing tool names alone aliases `fetch_recent_metrics(window=5m)...",
    "decision_boundary": "The harness must choose between **abort** and **fork** at the moment a ledger checkpoint mismatches: - If the mismatched index lies *outside* any already-replayed downstream read-set (no agent has yet consumed it), the harness may **fork**: emit a new ledger lineage ID, invalidate all caches keyed on the old lineage, and re-instantiate downstream agents from...",
    "operational_effect": "After this incident, the harness enforces three changes. First, replay caches are keyed on the **full ordered ledger hash of the read-set**, not on ledger length or agent ID. Second, every recorded decision stores its read-set as an explicit list of ledger indices, captured at record time by instrumenting the context-assembly step. Third, the harness compute..."
  },
  "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": "6934906f252a8a123e200b312a94f48b15d3ac9bf3de76d96586312d2bb23a36",
    "verified_classes": [
      "ReplayDivergenceError",
      "LedgerEntry",
      "RecordedDecision",
      "ReplayHarness"
    ],
    "verified_functions": [
      "demo",
      "digest",
      "_prefix_hash",
      "find_divergence_shadow",
      "replay"
    ],
    "verified_functions_count": 5,
    "defensive_guards_count": 1,
    "raised_exceptions": [
      "ReplayDivergenceError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "hashlib",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
