{
  "schema_version": "1.3.0",
  "slug": "when-must-an-instance-emit-a-distinct-span-link-instead-of-a-parent-child-edge-in-genai-multi-agent-traces",
  "title": "When must an instance emit a distinct span link instead of a parent-child edge in GenAI multi-agent traces",
  "date_of_record": "2026 November 15",
  "scope": "Applies to OpenTelemetry-style GenAI semantic conventions where a single logical request fans out across agent invocations, tool calls, and retrieval steps that each produce spans. Does not apply to single-threaded, single-agent traces where every child has exactly one causal predecessor, nor to pure RPC propagation where W3C `traceparent` already encodes the only causal edge.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/when-must-an-instance-emit-a-distinct-span-link-instead-of-a-parent-child-edge-in-genai-multi-agent-traces.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/when-must-an-instance-emit-a-distinct-span-link-instead-of-a-parent-child-edge-in-genai-multi-agent-traces.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/when-must-an-instance-emit-a-distinct-span-link-instead-of-a-parent-child-edge-in-genai-multi-agent-traces.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1185,
    "python_slice_tokens": 222,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "A **parent-child edge** asserts *containment and exclusive causality*: the child span exists only as a phase of the parent, and the parent's duration brackets the child's. A **span link** asserts *causality without containment*: the linked span is a causal antecedent or co-cause, but it does not nest inside the linking span, and the linking span may have a d...",
    "what_was_observed": "In a three-agent pipeline (planner → retriever → synthesizer) with a shared tool executor, the executor span was conventionally parented under the *first* agent that invoked it. When the synthesizer later re-invoked the same logical tool operation within a deduplication window, the second call was recorded as a child of the first, producing: - **Inverted timestamps:** child `start_time` earlier than parent `start_tim...",
    "condition_of_validity": "A parent-child edge is valid **only if all three hold**: 1. **Temporal containment:** `child.start_time >= parent.start_time` and `child.end_time <= parent.end_time` within clock-skew tolerance. 2. **Exclusive causal ownership:** exactly one span in the trace claims this child as its direct descendant. 3. **Lifecycle subordination:** the child cannot outlive...",
    "decision_boundary": "Emit a **link, not a child edge**, when: - A tool result or sub-agent output is consumed by a span that did not directly invoke it (reuse / memoization / cache hit). - A span has **more than one genuine causal predecessor** (fan-in from parallel agents into a synthesizer). - The producing span's temporal envelope does **not** contain the consuming span (asyn...",
    "operational_effect": "Correctly distinguishing links from edges changes three downstream computations: critical-path latency (no double attribution), cost attribution per agent (no phantom re-charge to the first invoker), and causal replay (the graph remains a DAG of *causes*, not a tree of *containment*). Teams that conflate the two typically discover the defect only when a late..."
  },
  "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": "3914d4c6313ad320ad7133cd5b9c596e860763470f9624f3fa082396eb63d277",
    "verified_classes": [
      "SpanCausalityError",
      "SpanRecord"
    ],
    "verified_functions": [
      "encode_causal_edge"
    ],
    "verified_functions_count": 1,
    "defensive_guards_count": 1,
    "raised_exceptions": [
      "SpanCausalityError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
