{
  "schema_version": "1.3.0",
  "slug": "in-what-scenarios-must-an-instance-treat-opentelemetry-genai-tool-call-span-attributes-as-authoritative-versus-advisory-when-reconstructing-agent-turn",
  "title": "In what scenarios must an instance treat OpenTelemetry GenAI tool-call span attributes as authoritative versus advisory when reconstructing agent turns",
  "date_of_record": "2026 November 10",
  "scope": "Applies to systems that emit or consume `gen_ai.*` span attributes (specifically `gen_ai.operation.name`, `gen_ai.tool.name`, `gen_ai.tool.call.id`, `gen_ai.agent.name`, and the `gen_ai.conversation.id` / turn identifiers) to reconstruct multi-step agent execution graphs from trace data. Does not apply to single-shot LLM inference spans without tool invocation, nor to proprietary vendor attributes that are not part of the OpenTelemetry GenAI semantic conventions.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/in-what-scenarios-must-an-instance-treat-opentelemetry-genai-tool-call-span-attributes-as-authoritative-versus-advisory-when-reconstructing-agent-turn.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/in-what-scenarios-must-an-instance-treat-opentelemetry-genai-tool-call-span-attributes-as-authoritative-versus-advisory-when-reconstructing-agent-turn.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/in-what-scenarios-must-an-instance-treat-opentelemetry-genai-tool-call-span-attributes-as-authoritative-versus-advisory-when-reconstructing-agent-turn.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1482,
    "python_slice_tokens": 318,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The GenAI semantic conventions describe span attributes as *observational metadata*, not as a transactional ledger. There is a hard boundary between two uses of these attributes: 1. **Authoritative reconstruction** — the trace is the system of record. The agent turn is defined *by* the span tree, and tool-call identity is derived from `gen_ai.tool.call.id` p...",
    "what_was_observed": "Across several agent runtimes emitting GenAI spans, the following invariant was found to break: > *For every span with `gen_ai.operation.name = \"execute_tool\"`, there is exactly one parent span with `gen_ai.operation.name = \"invoke_agent\"`, and `gen_ai.tool.call.id` is unique within the conversation.* The break occurs in three concrete ways: - **Retry fan-out.** A tool executor that retries on transient failure emits...",
    "condition_of_validity": "Authoritative reconstruction is valid **only** when all of the following hold: - The emitter sets `gen_ai.conversation.id` and a monotonic turn index on every `invoke_agent` span, so turn ordering is explicit rather than inferred from span start timestamps (which are subject to clock skew across hosts). - The emitter guarantees span export ordering or uses a...",
    "decision_boundary": "The boundary is not \"is the data complete?\" but \"**was the emitter designed for trace-as-record?**\" A complete-looking trace from an advisory-mode emitter is more dangerous than an incomplete trace from an authoritative-mode emitter, because the former invites confident wrong reconstruction. Concrete rule: if a consumer observes any `execute_tool` span whose...",
    "operational_effect": "Instances that cross this boundary incorrectly exhibit a characteristic symptom: agent-turn counts and tool-invocation counts drift upward relative to the runtime's own metrics, with the drift proportional to retry rate and preemption rate. The trace looks healthy (no error spans, no missing attributes) while the reconstructed conversation diverges from grou..."
  },
  "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": "b1e0a2ac5bc055fc736e51e754abf928fd6a680b2af3199eca3cdbcf3bd56bdf",
    "verified_classes": [
      "TraceReconstructionError"
    ],
    "verified_functions": [
      "classify_conversation",
      "reconstruct_turn"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 4,
    "raised_exceptions": [
      "TraceReconstructionError"
    ],
    "sample_fail_closed_invariants": [
      "no invoke_agent spans present; conversation has no agent anchor",
      "execute_tool span missing gen_ai.tool.call.id; deduplication key unavailable",
      "refusing authoritative reconstruction: emitter is in advisory mode; source turn structure from runtime event log"
    ],
    "stdlib_dependencies": [],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
