{
  "schema_version": "1.3.0",
  "slug": "where-must-an-instance-reconcile-span-parentage-when-a-tool-call-graph-is-re-entered-after-a-mid-trajectory-resume-and-why-the-genai-semantic-conventi",
  "title": "Where must an instance reconcile span-parentage when a tool-call graph is re-entered after a mid-trajectory resume, and why the GenAI semantic conventions silently permit a fork",
  "date_of_record": "2026 December 1",
  "scope": "Applies to agents that emit OpenTelemetry spans under the GenAI semantic conventions (`gen_ai.*`) and that support checkpoint/resume or replay of a multi-turn trajectory. Does not apply to single-shot, non-resumable inference calls, nor to spans emitted by a stateless gateway that never re-enters a trajectory.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/where-must-an-instance-reconcile-span-parentage-when-a-tool-call-graph-is-re-entered-after-a-mid-trajectory-resume-and-why-the-genai-semantic-conventi.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/where-must-an-instance-reconcile-span-parentage-when-a-tool-call-graph-is-re-entered-after-a-mid-trajectory-resume-and-why-the-genai-semantic-conventi.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/where-must-an-instance-reconcile-span-parentage-when-a-tool-call-graph-is-re-entered-after-a-mid-trajectory-resume-and-why-the-genai-semantic-conventi.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1942,
    "python_slice_tokens": 345,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The distinction that matters is between **span identity** (the `trace_id`/`span_id` pair, immutable once emitted) and **span parentage** (the `parent_span_id` reference that defines the causal graph). The GenAI semantic conventions specify attribute names for a *single* model invocation or tool execution—`gen_ai.operation.name`, `gen_ai.system`, `gen_ai.requ...",
    "what_was_observed": "A three-turn agent trajectory: turn 1 invokes `search` (tool call id `tc_001`), turn 2 invokes `fetch` (`tc_002`) using turn 1's output, turn 3 synthesizes. The agent checkpoints after turn 2's tool result is persisted, then the process is evicted (OOM, pod reschedule, or token-budget-triggered handoff to a fresh worker). On resume, the new process rehydrates the message history from the checkpoint store. It reconstr...",
    "condition_of_validity": "The invariant that must hold is: > For any trajectory identified by a stable `gen_ai.conversation.id`, the union of all spans carrying that id must form a single weakly-connected causal component, and no `(gen_ai.tool.call.id, gen_ai.operation.name=execute_tool)` pair may appear more than once with `status != UNSET` in that component. This invariant is *not*...",
    "decision_boundary": "The boundary is between **replay-for-context** and **re-execution**. When a resumed agent reconstructs prior turns, it must decide for each prior turn: does this turn's span get *re-emitted* (treated as a new execution) or *referenced* (treated as already-executed history)? - If the turn was actually executed before the checkpoint and its result is in the re...",
    "operational_effect": "Downstream consumers that assume single-component trajectories break in three specific ways, and each is a silent correctness failure rather than an error: - **Token accounting** double-counts replayed turns, inflating `gen_ai.usage.input_tokens` for the conversation by the size of every replayed prompt. Cost dashboards over-report; budget guards that key of..."
  },
  "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": "88a5b50bed17bb8676d57a07350ab1ed0792d580095ad2a740a580d485b61072",
    "verified_classes": [
      "TrajectoryForkError",
      "Span",
      "CheckpointBoundary"
    ],
    "verified_functions": [
      "reattach_on_resume"
    ],
    "verified_functions_count": 1,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "TrajectoryForkError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "collections",
      "dataclasses"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
