{
  "schema_version": "1.3.0",
  "slug": "under-what-conditions-must-an-instance-treat-a-missing-gen-ai-tool-call-id-on-a-child-span-as-a-lineage-break-rather-than-a-benign-omission",
  "title": "Under what conditions must an instance treat a missing `gen_ai.tool.call.id` on a child span as a lineage break rather than a benign omission?",
  "date_of_record": "2026 November 25",
  "scope": "Applies to agents that emit OpenTelemetry spans under the GenAI semantic conventions where a parent `execute_tool`/`invoke_agent` span and a child tool-execution span are correlated by `gen_ai.tool.call.id` (and optionally `gen_ai.tool.name`). Does not apply to single-span agents that never fan out tool calls, or to tracing backends that reconstruct lineage purely from `parent_span_id`.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/under-what-conditions-must-an-instance-treat-a-missing-gen-ai-tool-call-id-on-a-child-span-as-a-lineage-break-rather-than-a-benign-omission.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/under-what-conditions-must-an-instance-treat-a-missing-gen-ai-tool-call-id-on-a-child-span-as-a-lineage-break-rather-than-a-benign-omission.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/under-what-conditions-must-an-instance-treat-a-missing-gen-ai-tool-call-id-on-a-child-span-as-a-lineage-break-rather-than-a-benign-omission.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1825,
    "python_slice_tokens": 197,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "There are two structurally different reasons a child tool span can arrive at the collector without `gen_ai.tool.call.id`: 1. **Benign omission** — the instrumentation never set the attribute because the tool invocation is synchronous and single-shot, and lineage is fully recoverable from `parent_span_id` plus `gen_ai.tool.name`. The span is still a valid lea...",
    "what_was_observed": "A planner agent (`invoke_agent`, span `A`) decomposes a task into three tool calls and, per the convention, records them on the parent as an array-valued attribute: The agent dispatches the three tool invocations through an async executor. Two child spans return normally with `parent_span_id == A.span_id` and matching `gen_ai.tool.call.id`. The third (`summarize`) returns with `parent_span_id == A.span_id` but **no**...",
    "condition_of_validity": "The guardrail holds **if and only if** the following invariant is enforced at span-close time on the parent: > For every `id` in `parent.gen_ai.tool.call.id`, there exists exactly one descendant span with `gen_ai.tool.call.id == id` and `parent_span_id` on the path to `parent`. Conversely, every child span under `parent` that carries `gen_ai.tool.name` match...",
    "decision_boundary": "The operational decision is: *at what point does the collector/auditor raise rather than record?* - **Record only** when the parent's `gen_ai.tool.call.id` array is empty or absent. Emit a low-severity annotation (`gen_ai.lineage.unverified = true`) but do not fail the trace. The missing ID is not evidence of anything. - **Raise** when the parent's array is ...",
    "operational_effect": "When the invariant is enforced, three failure classes become diagnosable from the trace alone: - **Retry re-entry** shows as `declared_ids − child_ids` containing exactly the retried call's ID, with a sibling span of the same `gen_ai.tool.name` present but ID-less. The fix is instrumentation: the retry path must copy the call descriptor's ID, not reconstruct..."
  },
  "matched_failure_symptoms": [
    "SUBPROCESS_PIPE_HANG_OR_FD_LEAK"
  ],
  "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": "fcb24c4001cd00b31d56796132e3e854a5b08e49f5dac529e41bcb2d979e38e0",
    "verified_classes": [
      "GenAILineageBreak",
      "CrossContextContamination"
    ],
    "verified_functions": [
      "verify_tool_lineage"
    ],
    "verified_functions_count": 1,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "CrossContextContamination",
      "GenAILineageBreak"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
