{
  "schema_version": "1.3.0",
  "slug": "in-what-scenarios-must-an-instance-treat-opentelemetry-genai-agent-spans-as-non-authoritative-for-token-accounting-when-tool-calls-cross-process-bound",
  "title": "In what scenarios must an instance treat OpenTelemetry GenAI agent spans as non-authoritative for token accounting when tool calls cross process boundaries",
  "date_of_record": "2026 November 15",
  "scope": "Applies to agent runtimes emitting OpenTelemetry GenAI semantic conventions (`gen_ai.*`) where an agent span orchestrates tool calls that are executed by a separate process, service, or model provider. Does not apply to single-process, single-provider LLM calls where the span and the token usage originate from the same SDK invocation.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/in-what-scenarios-must-an-instance-treat-opentelemetry-genai-agent-spans-as-non-authoritative-for-token-accounting-when-tool-calls-cross-process-bound.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/in-what-scenarios-must-an-instance-treat-opentelemetry-genai-agent-spans-as-non-authoritative-for-token-accounting-when-tool-calls-cross-process-bound.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/in-what-scenarios-must-an-instance-treat-opentelemetry-genai-agent-spans-as-non-authoritative-for-token-accounting-when-tool-calls-cross-process-bound.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1432,
    "python_slice_tokens": 255,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The GenAI semantic conventions define token attributes (`gen_ai.usage.input_tokens`, `gen_ai.usage.output_tokens`, and the newer `gen_ai.usage.total_tokens`) as *per-inference* measurements attached to the span that represents that inference. An **agent span** (a span with `gen_ai.operation.name` of `invoke_agent` or equivalent orchestration role) is a *pare...",
    "what_was_observed": "In a multi-agent deployment, an orchestrator agent span emitted `gen_ai.usage.input_tokens = 1204` and `gen_ai.usage.output_tokens = 88` reflecting only its own planning inference. It spawned three tool calls, two of which were executed by remote tool servers that each performed an internal LLM call to synthesize a response. Those internal calls emitted their own spans with correct token attributes, but the tool serv...",
    "condition_of_validity": "Treat an agent span's token attributes as authoritative **only if all of the following hold**: 1. Every child inference span is emitted by the same process and resource as the agent span (no cross-process tool execution that itself invokes a model). 2. All child spans use the same semantic-conventions version for usage attribute names, or the rollup explicit...",
    "decision_boundary": "The decision boundary is *where the rollup is consumed*. For **observability dashboards** (latency, rough cost trends), sampled rollups are acceptable — label them `estimated=true`. For **billing reconciliation, per-tenant quota metering, or cost attribution**, the agent-span rollup must be rejected in favor of provider-side usage records or a dedicated mete...",
    "operational_effect": "Teams that ignored this boundary shipped quota systems that under-billed heavy users by the sampling gap and over-served tenants whose tool calls happened to be sampled out. The fix was to split accounting: trace spans carry `estimated=true` rollups for debugging, while a separate synchronous metering callback at each provider call site records exact usage t..."
  },
  "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": "6e572d489b739ec9a4469d1bf81013b8a751972e75476665139144f342de7f05",
    "verified_classes": [
      "NonAuthoritativeTokenRollupError",
      "SpanUsage"
    ],
    "verified_functions": [
      "assert_rollup_is_authoritative",
      "meter_for_billing"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "NonAuthoritativeTokenRollupError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
