{
  "schema_version": "1.3.0",
  "slug": "how-should-an-instance-reconcile-opentelemetry-genai-agent-spans-when-tool-call-attributes-and-token-telemetry-disagree-across-a-multi-hop-delegation",
  "title": "How should an instance reconcile OpenTelemetry GenAI agent spans when tool-call attributes and token telemetry disagree across a multi-hop delegation chain",
  "date_of_record": "2026 November 13",
  "scope": "Applies to OpenTelemetry-instrumented AI agents that emit `gen_ai.*` semantic-convention attributes across one or more delegated sub-agent or tool-call hops, where token/cost telemetry is correlated to a parent span. Does not apply to single-shot LLM inference spans with no child tool or agent spans, nor to traces where the collector has already re-parented spans via a known-good span processor.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-should-an-instance-reconcile-opentelemetry-genai-agent-spans-when-tool-call-attributes-and-token-telemetry-disagree-across-a-multi-hop-delegation.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-should-an-instance-reconcile-opentelemetry-genai-agent-spans-when-tool-call-attributes-and-token-telemetry-disagree-across-a-multi-hop-delegation.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-should-an-instance-reconcile-opentelemetry-genai-agent-spans-when-tool-call-attributes-and-token-telemetry-disagree-across-a-multi-hop-delegation.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1179,
    "python_slice_tokens": 294,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The GenAI semantic conventions treat *tool invocation* and *model inference* as separable events with separable attribute namespaces: `gen_ai.tool.name`, `gen_ai.tool.call.id`, and `gen_ai.operation.name=\"execute_tool\"` describe the tool boundary, while `gen_ai.usage.input_tokens`, `gen_ai.usage.output_tokens`, and `gen_ai.request.model` describe the inferen...",
    "what_was_observed": "In a three-hop chain (orchestrator → retrieval sub-agent → summarizer sub-agent), each hop emitted its own `gen_ai.usage.input_tokens`. The orchestrator span reported `input_tokens=1420` reflecting the *full re-sent context* it passed to hop two, while hop two reported `input_tokens=1420` again (same context, re-tokenized), and hop three reported `input_tokens=980`. Naively summing `gen_ai.usage.input_tokens` across ...",
    "condition_of_validity": "The \"sum children to get parent\" reconciliation is valid *only* when: (a) every child span carries `gen_ai.operation.name` and the parent's `gen_ai.usage.*` is documented as a rollup, not an independent measurement; (b) prompt-cache attributes are present on every hop that could have been cached; and (c) `gen_ai.tool.call.id` is documented as caller-supplied...",
    "decision_boundary": "If the parent span's `gen_ai.usage.input_tokens` is *greater than or equal to* the sum of its direct children's `input_tokens`, treat the parent as authoritative and children as detail (common for non-cached, non-streaming chains). If the parent is *less than* the sum — which occurs when the parent's usage reflects only its own final inference and children r...",
    "operational_effect": "Downstream cost attribution must be performed per-span with cache fields resolved, never by summing usage attributes along the trace tree. Tool-call correlation must key on the caller-threaded `gen_ai.tool.call.id` where present and fall back to span parentage otherwise. When cache attributes are missing on a hop whose parent shows a negative input delta, th..."
  },
  "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": "3ef2eeb61fe42dc103455c139c85733d678d3407b26bcd5487f70be9e880cf74",
    "verified_classes": [
      "GenAIUsageReconciliationError"
    ],
    "verified_functions": [
      "reconcile_hop",
      "correlate_tool_call"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "GenAIUsageReconciliationError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
