{
  "schema_version": "1.3.0",
  "slug": "when-must-an-agent-emitter-reject-a-span-that-claims-gen-ai-tool-call-semantics-but-carries-no-resolvable-tool-identity",
  "title": "When must an agent emitter reject a span that claims `gen_ai.tool.call` semantics but carries no resolvable tool identity?",
  "date_of_record": "2026 November 5",
  "scope": "Applies to agent runtimes and instrumentation shims that emit OpenTelemetry spans under the `gen_ai.*` semantic conventions for tool invocations, memory reads, and agent steps. Does not apply to plain LLM inference spans (`gen_ai.chat`) or to vendor-proprietary trace formats that are never re-emitted as OTLP.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/when-must-an-agent-emitter-reject-a-span-that-claims-gen-ai-tool-call-semantics-but-carries-no-resolvable-tool-identity.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/when-must-an-agent-emitter-reject-a-span-that-claims-gen-ai-tool-call-semantics-but-carries-no-resolvable-tool-identity.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/when-must-an-agent-emitter-reject-a-span-that-claims-gen-ai-tool-call-semantics-but-carries-no-resolvable-tool-identity.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1688,
    "python_slice_tokens": 427,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The non-obvious boundary is between *span validity* and *span usefulness*, and it is not where most instrumentation assumes it is. A span can be structurally valid OTLP — correct `traceId`, `spanId`, monotonic timestamps, a `name`, a `kind` — and still be semantically uninterpretable downstream. The failure mode is specifically: a span whose `name` or attrib...",
    "what_was_observed": "Across three agent runtimes instrumented for tool-call tracing, the pattern recurred in a specific form: tool-call spans were emitted from a generic dispatch wrapper (`execute_tool(name, args)`) that was also used for internal helpers (argument coercion, retry backoff, schema validation). When a helper raised before the real tool was bound, the wrapper's error path emitted a span with `gen_ai.operation.name = \"execut...",
    "condition_of_validity": "The invariant holds — i.e., the emitter MUST reject the span — when all of the following are true: 1. The span's `name` or `gen_ai.operation.name` asserts a tool call or memory read (a semantic claim of identity). 2. The corresponding identity attribute (`gen_ai.tool.name` for tool calls; store + key/namespace for memory reads) is missing, empty, or matches ...",
    "decision_boundary": "The boundary is drawn at the dispatch wrapper's span-emission point, before `span.end()` and before the SDK exporter runs. The decision is binary and local: - **Reject** (raise, do not export) when identity is unknown and the dispatch context could have supplied it. A rejected span is a *bug in instrumentation*, surfaced loudly at emit time, not a data-quali...",
    "operational_effect": "Enforcing this boundary converts a silent aggregate-corruption failure into an immediate, attributable instrumentation error. In the runtimes observed, the practical effects were: the \"unknown tool\" cohort dropped to zero (it became an emit-time exception during development, fixed before deploy); per-tool error rates stopped being inflated by helper-path spa..."
  },
  "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": "c727668677f09634160f9be92552fd3bdd2b30ad5525e94633a60eb1ecce0022",
    "verified_classes": [
      "UnresolvableToolIdentityError",
      "SpanDraft"
    ],
    "verified_functions": [
      "validate_before_export"
    ],
    "verified_functions_count": 1,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "UnresolvableToolIdentityError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "__future__",
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
