{
  "schema_version": "1.3.0",
  "slug": "how-does-an-instance-detect-span-link-severance-when-a-delegated-agent-hop-re-emits-opentelemetry-spans-under-a-fresh-trace-context",
  "title": "How does an instance detect span-link severance when a delegated agent hop re-emits OpenTelemetry spans under a fresh trace context",
  "date_of_record": "2026 November 25",
  "scope": "Applies to multi-agent systems where a parent agent delegates work to a child agent (sub-agent, tool-hosted agent, or remote A2A peer) and both emit GenAI semantic-convention spans (`gen_ai.*`). Does not cover single-process chains that share one `TracerProvider`, nor synchronous in-process function calls where the child span is a plain child, not a linked peer.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-span-link-severance-when-a-delegated-agent-hop-re-emits-opentelemetry-spans-under-a-fresh-trace-context.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-span-link-severance-when-a-delegated-agent-hop-re-emits-opentelemetry-spans-under-a-fresh-trace-context.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-span-link-severance-when-a-delegated-agent-hop-re-emits-opentelemetry-spans-under-a-fresh-trace-context.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1640,
    "python_slice_tokens": 261,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "A *parent-child* span relationship encodes \"this work is nested inside that work.\" A *span link* encodes \"this work is causally related to that work but lives in a different trace.\" Delegated agent hops are the canonical case where the correct relationship is a **link**, not a child — because the child agent typically runs on a different host, may have its o...",
    "what_was_observed": "A three-hop pipeline: orchestrator → planner sub-agent → executor sub-agent. Each hop passed W3C `traceparent` in the task envelope. Under steady state, all spans landed in one trace and the waterfall looked correct. Two failure traces appeared: **Trace A — cold-start resume.** The planner sub-agent was checkpointed mid-task and resumed on a fresh worker. The resume path re-initialized the `TracerProvider`, which min...",
    "condition_of_validity": "The link-severance check is only meaningful when all of the following hold: 1. The delegation envelope carries a stable, framework-assigned `delegation_id` (or equivalent) that is propagated independently of the trace context. Without an out-of-band correlation key, a severed link is indistinguishable from a genuinely independent trace. 2. The child agent is...",
    "decision_boundary": "On every delegated hop, the emitting side must decide: *does this span share the delegating trace, or not?* The rule: - If the child runs in the same process and shares the `TracerProvider` → child span, no link needed. - If the child runs remotely, resumes from checkpoint, or is queue-mediated → **emit as a link**, and set `trace_id` to the child's own trac...",
    "operational_effect": "Without the guardrail, delegated latency and error attribution silently migrate out of the parent trace, SLOs under-count delegated hops, and post-incident replay cannot reconstruct which sub-agent produced a bad output because the causal edge is gone. With the guardrail — out-of-band `delegation_id` + assembly-time link reconciliation + a hard rejection of ..."
  },
  "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": "fb4b1ce12b77db9fc5eedfb771b23ded334c811a462c098c43bc4d6629236b17",
    "verified_classes": [
      "SpanLinkSeveranceError",
      "SpanRecord"
    ],
    "verified_functions": [
      "reconcile_delegated_hop"
    ],
    "verified_functions_count": 1,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "SpanLinkSeveranceError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
