{
  "schema_version": "1.3.0",
  "slug": "under-what-conditions-must-an-instance-refuse-to-link-a-child-span-to-a-parent-trace-when-an-a2a-task-id-crosses-an-mcp-transport-hop",
  "title": "Under what conditions must an instance refuse to link a child span to a parent trace when an A2A task ID crosses an MCP transport hop",
  "date_of_record": "2026 November 29",
  "scope": "Applies to agent runtimes that emit OpenTelemetry-style spans across both MCP (tool/resource transport) and A2A (peer task delegation) hops, where a single logical task is expected to produce one causal trace. Does not apply to single-transport deployments or to traces stitched offline from log correlation keys after the fact.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/under-what-conditions-must-an-instance-refuse-to-link-a-child-span-to-a-parent-trace-when-an-a2a-task-id-crosses-an-mcp-transport-hop.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/under-what-conditions-must-an-instance-refuse-to-link-a-child-span-to-a-parent-trace-when-an-a2a-task-id-crosses-an-mcp-transport-hop.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/under-what-conditions-must-an-instance-refuse-to-link-a-child-span-to-a-parent-trace-when-an-a2a-task-id-crosses-an-mcp-transport-hop.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2012,
    "python_slice_tokens": 351,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "There are two distinct identities in a multi-hop agent call, and conflating them is the source of the failure: - The **trace/span identity** (`trace_id`, `parent_span_id`) is a *causal* claim: \"this work happened because of that work.\" It is propagated in-band via the W3C `traceparent` header or MCP `_meta` field. - The **A2A task ID** is a *logical* claim: ...",
    "what_was_observed": "A three-hop delegation: orchestrator agent `O` → remote peer agent `P` (over A2A) → tool server `T` (over MCP). The trace was expected to be `O.span → P.span → T.span`. Trace of the actual event sequence: 1. `O` starts span `S_O`, mints A2A task `task-7f3a`, and sends the A2A request. The A2A transport does **not** carry `traceparent` (the SDK version in use serialized `Task.id` but dropped the `traceparent` header o...",
    "condition_of_validity": "The invariant that must hold for a span to be a legitimate child of another: > A child span `C` may be linked to parent `P` under a shared `trace_id` **iff** `C`'s start was caused by `P`'s execution *and* `C`'s context was derived from `P`'s context through an in-band propagation mechanism (W3C `traceparent`, MCP `_meta.traceparent`, or an equivalent signed...",
    "decision_boundary": "The boundary is a single predicate the linker must evaluate before any parent rewrite: If `child.inbound_context_source == TASK_ID_INFERENCE` — i.e., the only evidence of parentage is a matching `Task.id` — the linker **must not** rewrite `parent_span_id` or `trace_id`. It may emit a *link* (an OpenTelemetry `Link`, not a parent edge) annotated `correlation=...",
    "operational_effect": "Enforcing the invariant changes three operational behaviors: 1. **Traces become multi-rooted in the honest case.** When A2A propagation is genuinely broken (as in the observed case), the trace fragments into two roots joined by a link. Dashboards must be built to expect this — a \"complete\" trace is not the same as a \"connected\" trace, and the health metric i..."
  },
  "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": "6c6717c59b017f109b1887b9fc2315bbb7765c69d672a1a6d035c05153acfe49",
    "verified_classes": [
      "ContextSource",
      "SpanForgeryError",
      "SpanContext",
      "Span"
    ],
    "verified_functions": [
      "link_child_to_parent",
      "propagate_across_a2a"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "SpanForgeryError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "__future__",
      "dataclasses",
      "enum"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
