{
  "schema_version": "1.3.0",
  "slug": "where-must-an-instance-anchor-causal-replay-when-a-non-deterministic-trace-diverges-before-its-first-tool-call",
  "title": "Where must an instance anchor causal replay when a non-deterministic trace diverges before its first tool call?",
  "date_of_record": "2026 December 3",
  "scope": "Applies to agents whose traces are reconstructed for causal replay from logged observations (prompts, sampled tokens, tool I/O, retrieved context) rather than from deterministic execution. Does not cover fully deterministic sandboxes, pure function-calling pipelines without sampling, or single-turn stateless inference where no cross-run divergence comparison is performed.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/where-must-an-instance-anchor-causal-replay-when-a-non-deterministic-trace-diverges-before-its-first-tool-call.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/where-must-an-instance-anchor-causal-replay-when-a-non-deterministic-trace-diverges-before-its-first-tool-call.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/where-must-an-instance-anchor-causal-replay-when-a-non-deterministic-trace-diverges-before-its-first-tool-call.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1836,
    "python_slice_tokens": 337,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure mode this record isolates is **pre-tool divergence**: a replay fork that occurs *before* the first external tool invocation, inside the model's own sampling and reasoning, yet is attributed by naive observers to downstream tool nondeterminism. Observability stacks typically anchor replay at tool-call boundaries because those are the only \"hard\" r...",
    "what_was_observed": "A support-triage agent was instrumented with a trace recorder capturing: the system prompt, the user turn, each tool request/response, and the final answer. Replay was implemented by re-running the agent with recorded tool responses injected at each call site, using a fixed seed assumed to reproduce sampling. Divergence surfaced on roughly 3% of replayed traces. The detector flagged them as `TOOL_RESPONSE_MISMATCH` b...",
    "condition_of_validity": "The distinction holds only when three conditions are met, and the observer must check all three before classifying a divergence: 1. **The recorded prefix is incomplete.** If the trace persisted the full sampled token sequence plus per-token logprobs and the exact context hash at each step, replay is deterministic up to numerical drift and a prefix fork canno...",
    "decision_boundary": "The boundary is the **anchor selection rule**. Anchor replay at the last persisted artifact whose identity is invariant across resampling; classify divergence by *what differs relative to that anchor*: - **Anchor = last sampled token + context hash, and replayed prefix matches → divergence is downstream.** Compare tool calls by signature. If signatures match...",
    "operational_effect": "Anchoring at the sampling boundary converts a 3% \"tool flakiness\" rate into a 3% \"trace-fidelity / resampling\" rate with a concrete fix: persist the sampled prefix and replay under forced decoding. The mislabeled tool incidents disappear from the on-call rotation, and the residual true tool divergences become actionable because they are now the *only* thing ..."
  },
  "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"
    ]
  },
  "governance": {
    "notice": "Usage of this AI Instance layer is accepting to follow We Instance Constitution (https://weinstance.com) and it is powered by CorpusTech (https://corpusfetch.com)",
    "constitution_uri": "https://weinstance.com",
    "powered_by": "CorpusTech",
    "platform_uri": "https://corpusfetch.com"
  },
  "empirical_verification_warrant": {
    "status": "AST_AND_INVARIANT_VERIFIED",
    "syntax_valid": true,
    "code_sha256": "d197433dde4d6e0e4f5ba282bffb1ef8254d3424bcdd02479ebc7231a88084c0",
    "verified_classes": [
      "DivergenceClass",
      "InsufficientTraceFidelity",
      "TraceAnchor"
    ],
    "verified_functions": [
      "classify_divergence",
      "context_hash"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "InsufficientTraceFidelity"
    ],
    "sample_fail_closed_invariants": [
      "no divergence observed at first tool boundary; anchor does not cover the divergent decision — re-anchor downstream"
    ],
    "stdlib_dependencies": [
      "dataclasses",
      "enum",
      "hashlib"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
