{
  "schema_version": "1.3.0",
  "slug": "what-happens-when-an-instance-replays-a-trajectory-whose-tool-outputs-were-non-deterministic-trace-divergence-at-the-observation-boundary",
  "title": "What happens when an instance replays a trajectory whose tool outputs were non-deterministic: trace divergence at the observation boundary",
  "date_of_record": "2026 November 28",
  "scope": "Applies to any agent runtime that records full execution trajectories (prompt, tool call, tool result, model output) for replay, audit, or provenance reconstruction, where at least one tool in the trajectory is non-deterministic (live APIs, time, RNG, retrieval over a mutating index, sampling temperature > 0). Does not apply to trajectories restricted to pure deterministic tools with temperature 0 and a frozen model snapshot, which are bit-replayable by construction.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-replays-a-trajectory-whose-tool-outputs-were-non-deterministic-trace-divergence-at-the-observation-boundary.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-replays-a-trajectory-whose-tool-outputs-were-non-deterministic-trace-divergence-at-the-observation-boundary.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-replays-a-trajectory-whose-tool-outputs-were-non-deterministic-trace-divergence-at-the-observation-boundary.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2027,
    "python_slice_tokens": 425,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure is not \"replay produced different output.\" That is expected and benign. The failure is **trace diffing that treats observation divergence as decision divergence**. When an auditor replays a trajectory, the runtime re-executes tool calls and compares the new trace to the recorded one. A naive differ attributes every downstream delta to a change in...",
    "what_was_observed": "A production incident on a research agent with three tools: `web_search` (live, non-deterministic ranking), `fetch_url` (returns mutable page content), and `calculator` (deterministic). The trajectory under audit had 14 steps. At step 4, `web_search` returned a ranked list; the model picked result #2 and called `fetch_url`. At step 6 the model extracted a figure and at step 9 called `calculator`. During replay, `web_...",
    "condition_of_validity": "A trajectory is **replayable for provenance** if and only if, for every step `i`: - The observation `o_i` is recorded with a content hash `h(o_i)` and a **source tag** (`recorded` vs `re-derived`). - Replay injects `o_i` from the record, not from the tool, unless the auditor explicitly requests an *environment replay* (a different, weaker artifact). - The mo...",
    "decision_boundary": "The runtime must classify every divergence into exactly one of three buckets before it is reported: - **Observation divergence (`OBS`):** replay input `o_i'` differs from recorded `o_i`. Cause is the environment. Decision provenance is *intact*; the agent would have decided the same given the same input. Report as environment drift, not model regression. - *...",
    "operational_effect": "After the incident, the runtime was changed to record each observation with `(content_hash, source_tag, tool_version, timestamp)` and to make replay default to **injection mode**. The differ was rewritten to walk the trace in topological order and stop escalation at the first input-tuple mismatch, labeling the subtree `OBS` and the remainder `NOT-COMPARABLE`..."
  },
  "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": "77695aeb18ef6ce0102fa42bd357cd90ae842fb69de5944a9fd11bacd7fe309b",
    "verified_classes": [
      "ProvenanceViolation",
      "DivergenceClass",
      "Step",
      "TraceDiff"
    ],
    "verified_functions": [
      "_h",
      "diff_trajectories",
      "assert_no_false_policy_divergence"
    ],
    "verified_functions_count": 3,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "ProvenanceViolation"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "enum",
      "hashlib",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
