{
  "schema_version": "1.3.0",
  "slug": "what-structural-signals-indicate-a-genai-agent-span-has-silently-decoupled-its-tool-call-attributes-from-the-actual-model-invocation-it-claims-to-trac",
  "title": "What structural signals indicate a GenAI agent span has silently decoupled its tool-call attributes from the actual model invocation it claims to trace",
  "date_of_record": "2026 November 29",
  "scope": "Applies to agents instrumented with OpenTelemetry GenAI semantic conventions (`gen_ai.*`) where a single agent invocation emits both a model-invocation span and one or more tool-execution spans, correlated by trace/span IDs and by `gen_ai.operation.name`. Does not apply to single-shot completion calls with no tool loop, nor to systems that emit a flat span per turn without parent/child linkage.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/what-structural-signals-indicate-a-genai-agent-span-has-silently-decoupled-its-tool-call-attributes-from-the-actual-model-invocation-it-claims-to-trac.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/what-structural-signals-indicate-a-genai-agent-span-has-silently-decoupled-its-tool-call-attributes-from-the-actual-model-invocation-it-claims-to-trac.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/what-structural-signals-indicate-a-genai-agent-span-has-silently-decoupled-its-tool-call-attributes-from-the-actual-model-invocation-it-claims-to-trac.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1975,
    "python_slice_tokens": 356,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The GenAI semantic conventions model an agent turn as a *span tree*: a parent span with `gen_ai.operation.name = \"chat\"` (or `\"invoke_agent\"`) carrying model attributes (`gen_ai.request.model`, `gen_ai.usage.input_tokens`, `gen_ai.usage.output_tokens`), and child spans with `gen_ai.operation.name = \"execute_tool\"` carrying `gen_ai.tool.name`, `gen_ai.tool.ca...",
    "what_was_observed": "A tool-augmented agent (framework emits OTel GenAI spans, model = a function-calling endpoint) was traced across a 4-step tool loop. The trace exported cleanly: one `invoke_agent` parent, four `execute_tool` children, correct `trace_id` propagation, no dropped spans. Three structural signals indicated decoupling: 1. **`gen_ai.tool.call.id` on children did not appear in the parent's recorded `tool_calls`.** The framew...",
    "condition_of_validity": "The GenAI conventions are *coherent* — tool attributes faithfully describe the model invocation that produced them — only when all of the following hold: - **Call-ID fidelity:** the `gen_ai.tool.call.id` on a child span equals the `id` field of the corresponding entry in the model's `tool_calls` output for the parent invocation. Any framework-side re-minting...",
    "decision_boundary": "The boundary is between **trusting the span tree as a causal record** and **treating it as a structural skeleton that requires an independent coherence check**. Concretely: - **Trust directly** only if the instrumentation layer is the *same component* that received the model response and dispatched the tool — i.e., no intermediate framework re-mints IDs or r...",
    "operational_effect": "When decoupling goes undetected, the operational consequences are specific and compounding: - **Cost attribution drifts.** Summed parent usage undercounts multi-step loops; per-tool cost becomes unattributable. Budget alarms keyed on `gen_ai.usage.output_tokens` fire late or never. - **Replay and eval diverge.** An eval harness that replays a trace by joinin..."
  },
  "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": "899663679cf189aedea52e8ea274f8a9a8fcee48c89c027f42c2e36fc4c8b70f",
    "verified_classes": [
      "SpanCoherenceError",
      "ToolCall",
      "ModelResponse",
      "ToolSpan",
      "ParentSpan"
    ],
    "verified_functions": [
      "validate_coherence",
      "ingest"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "SpanCoherenceError"
    ],
    "sample_fail_closed_invariants": [
      "usage attribution decoupled: parent output_tokens equals a single response while multiple tool children are attributed t"
    ],
    "stdlib_dependencies": [
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
