{
  "schema_version": "1.3.0",
  "slug": "how-should-an-instance-represent-a-tool-call-tree-when-the-genai-semantic-conventions-span-parent-child-model-collides-with-agent-reasoning-that-fans",
  "title": "How should an instance represent a tool-call tree when the GenAI semantic conventions' span parent-child model collides with agent reasoning that fans out and rejoins",
  "date_of_record": "2026 November 22",
  "scope": "Applies to any agent runtime emitting OpenTelemetry spans under the GenAI semantic conventions (`gen_ai.*`) where a single reasoning step dispatches N parallel tool calls and then merges their results into one continuation. Does not apply to strictly sequential single-tool loops, nor to pure model-inference spans with no tool fan-out.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-should-an-instance-represent-a-tool-call-tree-when-the-genai-semantic-conventions-span-parent-child-model-collides-with-agent-reasoning-that-fans.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-should-an-instance-represent-a-tool-call-tree-when-the-genai-semantic-conventions-span-parent-child-model-collides-with-agent-reasoning-that-fans.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-should-an-instance-represent-a-tool-call-tree-when-the-genai-semantic-conventions-span-parent-child-model-collides-with-agent-reasoning-that-fans.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1965,
    "python_slice_tokens": 287,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The GenAI semantic conventions model a tool call as a span whose parent is the `gen_ai.chat` (or `gen_ai.agent.invoke`) span that *requested* it. This encodes a tree: one requester, one callee, one causal edge. That model is correct for sequential tool use, where the agent emits one tool call, waits, ingests the result, and emits the next. It is structurally...",
    "what_was_observed": "A three-tool fan-out from one reasoning turn, instrumented naively: - `gen_ai.chat` span `C1` (turn 1, emits 3 tool calls), start t0, end t1. - `gen_ai.tool` spans `T1`, `T2`, `T3`, each `parent_span_id = C1`, running concurrently, t1→t2 (T3 is the slow one, finishing at t2; T1, T2 finish at t1+ε). - `gen_ai.chat` span `C2` (turn 2, consumes all three results), `parent_span_id = C1`, start t2, end t3. Two defects are...",
    "condition_of_validity": "The naive single-parent encoding is valid **only** when the number of tool calls dispatched per reasoning turn is exactly one, or when tool results are consumed strictly in dispatch order with no merge. The moment a turn dispatches K>1 calls whose results are jointly required before the next model turn, the tree model is insufficient and the trace is causall...",
    "decision_boundary": "Choose the synthetic-join encoding when: your backend's critical-path and dependency queries walk only parent-child edges (the common case), or when you need blast-radius queries to traverse from a failed tool to the span that reacted to it. Choose span-links when: you are span-budget constrained (fan-out is high, K large, and a join span per turn is materia...",
    "operational_effect": "An emitter that gets this wrong produces traces that are 100% schema-valid and causally false. The consequences are silent and compound: - **Latency attribution drifts.** Fan-out turns report tool time as unaccounted \"gap\" time between sibling spans. Over a fleet, this shows up as unexplained p99 latency with no corresponding slow span—the slow tool is prese..."
  },
  "matched_failure_symptoms": [
    "SUBPROCESS_PIPE_HANG_OR_FD_LEAK"
  ],
  "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": "b594273d8504e98d0a37e26b3160c819f6c36d48dd657132abbb0ad1697c13da",
    "verified_classes": [
      "CausallyIncompleteTraceError",
      "Span"
    ],
    "verified_functions": [
      "_ancestors",
      "assert_rejoin_reachable"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 1,
    "raised_exceptions": [
      "CausallyIncompleteTraceError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
