{
  "schema_version": "1.3.0",
  "slug": "where-must-an-instance-link-child-agent-spans-to-a-parent-trace-without-collapsing-causality-the-semantic-convention-span-link-boundary-in-multi-agent",
  "title": "Where must an instance link child agent spans to a parent trace without collapsing causality: the semantic-convention span-link boundary in multi-agent GenAI traces",
  "date_of_record": "2026 November 11",
  "scope": "Applies to multi-agent systems emitting OpenTelemetry GenAI semantic-convention spans where a child agent (sub-agent, tool-calling delegate, or planner-spawned worker) executes in a separate trace context from its initiator and must be joined causally. Does not apply to single-process agents whose sub-steps share one trace context, nor to fire-and-forget async work with no causal claim.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/where-must-an-instance-link-child-agent-spans-to-a-parent-trace-without-collapsing-causality-the-semantic-convention-span-link-boundary-in-multi-agent.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/where-must-an-instance-link-child-agent-spans-to-a-parent-trace-without-collapsing-causality-the-semantic-convention-span-link-boundary-in-multi-agent.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/where-must-an-instance-link-child-agent-spans-to-a-parent-trace-without-collapsing-causality-the-semantic-convention-span-link-boundary-in-multi-agent.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1540,
    "python_slice_tokens": 349,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "There are two mechanically different ways to make a child agent's work appear in a parent's causal graph: **parent-child span nesting** (`parent_span_id` set on the child, one trace) and **span linking** (`SpanLink` with a `trace_id`/`span_id` reference, two traces). The GenAI semantic conventions permit both, and the naive reading is that they are interchan...",
    "what_was_observed": "In a planner/worker deployment, a planner span (`genai.operation.name = chat`, agent role `planner`) spawned three worker agents via a message queue. Each worker emitted its own root span because the queue consumer started a fresh trace — the `traceparent` was carried in the message envelope but the SDK's propagator was configured `tracecontext`-only on the consumer side, so the extracted context was *not* made the p...",
    "condition_of_validity": "Nesting (`parent_span_id`) is valid *if and only if* the child span's lifetime is contained within the parent's and the child inherits the parent's trace context. Linking is valid *if and only if* the child is a genuinely independent trace (different lifecycle, different sampling authority, possibly different retention) and the consumer of the trace data tre...",
    "decision_boundary": "Choose **nesting** when: the child blocks the parent (planner awaits worker), you need latency attribution on the parent's critical path, and the child can share the parent's sampling decision. Choose **linking** when: the child is detached (async, queued, human-in-the-loop), the child may outlive the parent, or the child must be sampled/retained independent...",
    "operational_effect": "Enforcing the boundary moved planner p99 from a false 40ms to a true 2.1s, which immediately exposed a worker retry storm that had been invisible. Tail-sampling was reconfigured to sample the whole causal set (planner + linked workers) as a unit, eliminating dangling links. Clock-skew inversion was resolved by deriving ordering from `parent_span_id` and the ..."
  },
  "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": "b61d2e45738a8d7b485426ba57169a67bfa05fd49e97f05d289c502581241ed3",
    "verified_classes": [
      "CausalLinkViolation",
      "AgentSpan"
    ],
    "verified_functions": [
      "validate_causal_edge",
      "build_edge"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "CausalLinkViolation"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
