{
  "schema_version": "1.3.0",
  "slug": "when-must-an-instance-refuse-to-emit-a-genai-tool-call-span-it-cannot-attribute-to-a-single-model-turn",
  "title": "When must an instance refuse to emit a GenAI tool-call span it cannot attribute to a single model turn",
  "date_of_record": "2026 November 28",
  "scope": "Applies to agents instrumented with OpenTelemetry GenAI semantic conventions (`gen_ai.*`) that emit `execute_tool` child spans under an `invoke_agent` or `chat` span, where tool invocation may be triggered by parallel model turns, retried by a supervisor loop, or replayed from a checkpoint. Does not apply to pure retrieval spans or to spans emitted by a deterministic orchestrator with a single serialized model call per tool dispatch.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/when-must-an-instance-refuse-to-emit-a-genai-tool-call-span-it-cannot-attribute-to-a-single-model-turn.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/when-must-an-instance-refuse-to-emit-a-genai-tool-call-span-it-cannot-attribute-to-a-single-model-turn.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/when-must-an-instance-refuse-to-emit-a-genai-tool-call-span-it-cannot-attribute-to-a-single-model-turn.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1698,
    "python_slice_tokens": 333,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The GenAI semantic conventions treat a tool-call span as a *child of a specific model turn* — the `chat` span that produced the tool call request. The attribute set (`gen_ai.tool.name`, `gen_ai.tool.call.id`, `gen_ai.operation.name=execute_tool`) presumes a 1:1 binding between one model response and one tool execution. That binding is an *invariant*, not a g...",
    "what_was_observed": "A multi-step agent with a planner loop executed a `search_docs` tool call. The planner model response contained two parallel tool calls (`call_a`, `call_b`) in one `chat` span. The executor dispatched both concurrently. `call_a` succeeded in 340ms. `call_b` hit a sandbox timeout at 30s, was retried by the supervisor, and on retry was re-emitted under a *new* `chat` span generated by a re-planning step that re-derived...",
    "condition_of_validity": "The strict parent-child binding is valid only when all of the following hold: 1. **Single model turn owns the tool call.** The `gen_ai.tool.call.id` is minted by the model response and never re-minted by a supervisor, re-planner, or checkpoint resume. 2. **Span export order preserves ancestry.** The parent `chat` span is exported (or at least buffered) befor...",
    "decision_boundary": "The instance must **refuse to emit** a `gen_ai.tool.call.id` that it cannot bind to a single, currently-open parent `chat` span. Concretely: - If a tool call is re-derived by a re-planner, it is a **new** call: mint a new `call.id`, set `gen_ai.tool.retry_of` to the prior ID, and emit under the re-plan `chat` span. Do not copy the old ID. - If the parent `ch...",
    "operational_effect": "Without this boundary, three failure classes propagate: 1. **Cost and latency inflation.** Duplicate `call.id`s under different parents double-count tool latency and token cost in any trace-derived metric. 2. **Evaluator corruption.** Trace-based evals that count tool invocations or measure retry rates will report phantom redundancy, triggering spurious agen..."
  },
  "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": "c0d6c2a1381f5bf726a4eb5ec3f4ed0190504d2dd5c483b0a3e3185da72b25a6",
    "verified_classes": [
      "ToolSpanAttributionError",
      "ChatSpan",
      "ToolSpan"
    ],
    "verified_functions": [
      "emit_tool_span"
    ],
    "verified_functions_count": 1,
    "defensive_guards_count": 5,
    "raised_exceptions": [
      "ToolSpanAttributionError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
