{
  "schema_version": "1.3.0",
  "slug": "why-does-an-instance-lose-causal-parentage-when-opentelemetry-genai-spans-span-a-tool-call-graph-that-re-enters-a-resumed-agent-turn",
  "title": "Why does an instance lose causal parentage when OpenTelemetry GenAI spans span a tool-call graph that re-enters a resumed agent turn",
  "date_of_record": "2026 November 27",
  "scope": "Applies to agents that emit OpenTelemetry spans under the GenAI semantic conventions (`gen_ai.*`) across multi-turn tool-call graphs where a turn can be suspended (human-in-the-loop, rate-limit backoff, checkpoint/resume) and resumed by a *different* process instance. Does not apply to single-process, single-turn synchronous agents, nor to trace-only instrumentation that never reconstructs parentage from span attributes alone.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/why-does-an-instance-lose-causal-parentage-when-opentelemetry-genai-spans-span-a-tool-call-graph-that-re-enters-a-resumed-agent-turn.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/why-does-an-instance-lose-causal-parentage-when-opentelemetry-genai-spans-span-a-tool-call-graph-that-re-enters-a-resumed-agent-turn.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/why-does-an-instance-lose-causal-parentage-when-opentelemetry-genai-spans-span-a-tool-call-graph-that-re-enters-a-resumed-agent-turn.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1927,
    "python_slice_tokens": 295,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The distinction that matters is between **transport parentage** and **semantic parentage** in a GenAI tool-call graph. Transport parentage is the W3C `traceparent`/`parent_span_id` link established at span creation: it is a single scalar pointer, and it survives serialization perfectly. Semantic parentage is the *logical* claim that \"this tool call belongs t...",
    "what_was_observed": "A three-turn agent (turn 1: plan; turn 2: tool call to a retrieval service; turn 3: synthesize) was instrumented with GenAI spans. Turn 2 was suspended mid-tool-call on a rate-limit response from the retrieval service, and a checkpoint was written containing the serialized `traceparent`, the pending `gen_ai.tool.call.id`, and the partial message array. A second worker resumed the turn 40 seconds later. The resumed wo...",
    "condition_of_validity": "The invariant that makes GenAI tool-call graphs reconstructable is: > **For every `execute_tool` span, there exists exactly one `chat` span in the same trace such that `execute_tool.parent_span_id == chat.span_id` AND `execute_tool.gen_ai.response.id == chat.gen_ai.response.id` AND `execute_tool.gen_ai.tool.call.id` is unique within the trace.** This is a *c...",
    "decision_boundary": "The boundary is: **does the resumed instance re-invoke the model before re-emitting the tool call?** - If the resume path replays the *exact* pending tool call without a model re-invocation (deterministic replay from checkpoint), the `gen_ai.response.id` is inherited consistently and the conjunction holds. This is safe but only works when the retry decision ...",
    "operational_effect": "Without this boundary, three concrete operational failures occur, all of which are invisible to span-tree visualizers: 1. **Orphaned tool calls in semantic reconstruction.** Auditors that pair tool calls to model turns by `gen_ai.response.id` silently drop resumed tool calls from the graph. Cost attribution under-counts tool spend on resumed turns; eval harn..."
  },
  "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": "774a9464d5caf916aab3c28e85bc463724bf6afa3125a7049c7f4892c3210321",
    "verified_classes": [
      "GenAIParentageViolation",
      "Span"
    ],
    "verified_functions": [
      "validate_tool_call_parentage"
    ],
    "verified_functions_count": 1,
    "defensive_guards_count": 4,
    "raised_exceptions": [
      "GenAIParentageViolation"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
