{
  "schema_version": "1.3.0",
  "slug": "when-must-an-instance-refuse-to-inherit-a-parent-span-broken-trace-parent-propagation-across-agent-handoff-sub-agent-spawn-and-async-task-resumption",
  "title": "When must an instance refuse to inherit a parent span: broken trace-parent propagation across agent handoff, sub-agent spawn, and async task resumption",
  "date_of_record": "2026 November 28",
  "scope": "Applies to any agent runtime that emits OpenTelemetry-style spans using GenAI semantic conventions and propagates trace context (`traceparent`/`tracestate`, or an in-process `SpanContext`) across an agent handoff, a sub-agent spawn, or a suspended-then-resumed async task. Does not apply to single-process, single-turn inference calls that complete within one span lifetime.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/when-must-an-instance-refuse-to-inherit-a-parent-span-broken-trace-parent-propagation-across-agent-handoff-sub-agent-spawn-and-async-task-resumption.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/when-must-an-instance-refuse-to-inherit-a-parent-span-broken-trace-parent-propagation-across-agent-handoff-sub-agent-spawn-and-async-task-resumption.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/when-must-an-instance-refuse-to-inherit-a-parent-span-broken-trace-parent-propagation-across-agent-handoff-sub-agent-spawn-and-async-task-resumption.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1939,
    "python_slice_tokens": 315,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The GenAI semantic conventions define *attributes* (`gen_ai.operation.name`, `gen_ai.agent.id`, `gen_ai.conversation.id`, `gen_ai.usage.input_tokens`) but they do **not** define *trace topology*. Span linking — whether a child span is a `child_of` the parent, a `follows_from` a prior span, or a `link` to a causally-related-but-not-nested span — is left to th...",
    "what_was_observed": "A multi-agent orchestration runtime (planner agent → tool-calling worker agents → an async \"deep research\" sub-agent that suspends on a long tool call and resumes minutes later) emitted spans that passed local validation but produced corrupted traces downstream. **Handoff case.** Planner agent `A` opens span `S_A` (`gen_ai.operation.name=invoke_agent`), decides to hand off to worker `B`, and passes its `SpanContext` ...",
    "condition_of_validity": "The `child_of` edge is valid **iff all three hold**: 1. **Lifetime enclosure** — `parent.end_time` is strictly after `child.end_time` in the causal execution, or the parent is still open at child creation *and* the runtime guarantees the parent cannot be cancelled/ended before the child. 2. **Context liveness** — the parent `SpanContext` is a live, non-ended...",
    "decision_boundary": "At child-span creation, evaluate: - **Is the inherited `SpanContext` live in this process's tracer?** If it was deserialized from a checkpoint, a message queue, or a handoff envelope, it is *not* live. → Do not `child_of`. Create a root span and add a `Link` to the serialized context. Re-evaluate sampling locally; never trust inherited `trace_flags` across a...",
    "operational_effect": "Without the guardrail, three concrete degradations were measured: (a) orphan-span drop rate of 8–14% in handoff-heavy traces, silently biasing latency percentiles low because dropped children were the slow ones; (b) trace-based cost attribution misassigning cancelled-parent cost to surviving children, inflating per-agent budget reports by up to 30% in fan-ou..."
  },
  "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": "2aa5862d086e1d5a1f8ca84ead625b4254500aff399539bebc2eb659bd0436a7",
    "verified_classes": [
      "SpanTopologyError",
      "BoundaryKind",
      "SpanContext"
    ],
    "verified_functions": [
      "decide_edge",
      "start_child_span"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "SpanTopologyError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "__future__",
      "dataclasses",
      "enum"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
