{
  "schema_version": "1.3.0",
  "slug": "what-structural-signals-indicate-opentelemetry-genai-tool-call-span-attribute-coercion-and-the-silent-loss-of-gen-ai-tool-call-arguments-under-non-jso",
  "title": "What structural signals indicate: OpenTelemetry GenAI Tool-Call Span Attribute Coercion and the Silent Loss of `gen_ai.tool.call.arguments` Under Non-JSON Serializable Payloads",
  "date_of_record": "2026 November 11",
  "scope": "Applies to OpenTelemetry GenAI semantic conventions (span attributes for `gen_ai.*` namespaces, specifically tool-call and agent-turn tracing) as emitted by instrumented LLM SDKs and agent frameworks when tool arguments or results contain values that are not directly JSON-serializable. Does not apply to pure text-generation spans, nor to telemetry backends that perform their own schema validation and rejection.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/what-structural-signals-indicate-opentelemetry-genai-tool-call-span-attribute-coercion-and-the-silent-loss-of-gen-ai-tool-call-arguments-under-non-jso.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/what-structural-signals-indicate-opentelemetry-genai-tool-call-span-attribute-coercion-and-the-silent-loss-of-gen-ai-tool-call-arguments-under-non-jso.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/what-structural-signals-indicate-opentelemetry-genai-tool-call-span-attribute-coercion-and-the-silent-loss-of-gen-ai-tool-call-arguments-under-non-jso.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1637,
    "python_slice_tokens": 383,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The GenAI semantic conventions define `gen_ai.tool.call.arguments` and `gen_ai.tool.call.result` as string-valued attributes containing a JSON-encoded representation of the tool's arguments/result. The convention is ambiguous about what happens when the underlying value is *already* a mapping or list versus when it is an opaque object (a dataclass instance, ...",
    "what_was_observed": "In a production agent-turn tracing pipeline (instrumented SDK emitting OTLP to a collector, fanout to a trace store and an offline replay worker), the following pattern was isolated across ~40k tool-call spans over a 72-hour window: - Spans whose tool arguments contained only JSON primitives: `gen_ai.tool.call.arguments` round-tripped exactly under `json.loads`. 100% fidelity. - Spans whose tool arguments contained a...",
    "condition_of_validity": "The above is only a valid diagnosis under the following conditions: - The instrumentation emits attributes at span creation, not via a post-hoc `set_attribute` after a serialization attempt whose exception is logged. If the SDK logs the `TypeError`, the operator can recover the signal from logs — but this is out-of-band and not guaranteed by the conventions....",
    "decision_boundary": "The operational decision is: **do not treat `gen_ai.tool.call.arguments` as a reliable structured field.** Treat it as an *advisory, best-effort, human-readable* annotation unless you control the serializer. Concretely: - If you own the instrumentation, wrap argument serialization in an explicit encoder that uses a tagged representation (e.g., `{\"__type__\": ...",
    "operational_effect": "After introducing the fidelity probe, the replay worker's silent-mismatch rate (replayed tool calls whose arguments differed from the original in a way that changed the tool's output) dropped from an estimated 6.1% of tool-call spans to under 0.2%, with the remainder quarantined and surfaced for manual inspection. The cost was a ~15% increase in quarantined ..."
  },
  "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": "10efea470c62665e909429b899dbd3f90681beb38a9ca37544178a62aca36fc4",
    "verified_classes": [
      "ToolCallArgumentFidelityError"
    ],
    "verified_functions": [
      "reconstruct_tool_arguments",
      "_looks_like_lossy_timestamp"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 4,
    "raised_exceptions": [
      "ToolCallArgumentFidelityError"
    ],
    "sample_fail_closed_invariants": [
      "gen_ai.tool.call.arguments absent for a tool that requires arguments; cannot distinguish 'no args' from 'serialization f"
    ],
    "stdlib_dependencies": [
      "datetime",
      "decimal",
      "json"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
