{
  "schema_version": "1.3.0",
  "slug": "why-does-an-instance-lose-its-trace-parent-when-an-mcp-tool-server-re-enters-an-a2a-sub-agent-the-trace-context-rebinding-gap-at-federated-boundaries",
  "title": "Why does an instance lose its trace parent when an MCP tool server re-enters an A2A sub-agent: the trace-context rebinding gap at federated boundaries",
  "date_of_record": "2026 November 30",
  "scope": "Applies to any agent runtime that propagates W3C Trace Context (`traceparent`/`tracestate`) or an equivalent correlation token across an MCP tool call that itself dispatches an A2A task to a remote agent. Does not apply to single-process tool calls, nor to A2A handoffs where the caller and callee share a span exporter and a single trace ID authority.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/why-does-an-instance-lose-its-trace-parent-when-an-mcp-tool-server-re-enters-an-a2a-sub-agent-the-trace-context-rebinding-gap-at-federated-boundaries.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/why-does-an-instance-lose-its-trace-parent-when-an-mcp-tool-server-re-enters-an-a2a-sub-agent-the-trace-context-rebinding-gap-at-federated-boundaries.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/why-does-an-instance-lose-its-trace-parent-when-an-mcp-tool-server-re-enters-an-a2a-sub-agent-the-trace-context-rebinding-gap-at-federated-boundaries.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1723,
    "python_slice_tokens": 379,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "There are two structurally different things called \"trace correlation\" and they fail for different reasons. **In-process correlation** is a span-tree property: a child span references a parent span ID that exists in the same collector's index, so the tree reconstructs deterministically. **Federated correlation** is a *string-propagation* property: the only t...",
    "what_was_observed": "A planner agent (`planner-01`) held an active span `S_p` with `trace_id=T1`, `span_id=A1`. It invoked an MCP tool `dispatch_research` on an MCP server (`mcp-research`) over streamable HTTP. The MCP server, per its own contract, is a thin adapter: on `tools/call` it performs an A2A `message/send` to a remote research agent (`researcher-7`). The MCP server's request handler ran inside an SDK that auto-creates a server-...",
    "condition_of_validity": "The invariant that must hold for federated correlation to be trustworthy is: > **For every A2A dispatch triggered inside an MCP handler, the outbound `traceparent` must be derived from the *request-scoped* context extracted at handler entry, and the remote runtime must treat a present-but-unparented `traceparent` as a hard error, not a soft fallback to a new...",
    "decision_boundary": "The boundary is between **treating correlation as best-effort metadata** and **treating it as a continuity invariant with a refuse-to-run contract**. Best-effort is acceptable when the sub-agent's work is independently meaningful and re-derivable (a stateless lookup). It is *not* acceptable when the sub-agent's output feeds back into the caller's reasoning l...",
    "operational_effect": "Once the rebinding gap is bounded, three observable properties change. First, orphan-trace rate becomes a first-class SLI: count of A2A server spans whose `trace_id` has no inbound edge from a known caller trace, alerting on any nonzero value for continuity-required tasks. Second, end-to-end latency becomes computable as a single trace duration rather than a..."
  },
  "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": "d36524dcbc74e6ef969c266d9ae81185bb67d577f32c8aeacc9362de32c29aa5",
    "verified_classes": [
      "TraceRebindError",
      "SpanContext"
    ],
    "verified_functions": [
      "extract_inbound",
      "build_outbound",
      "dispatch_research"
    ],
    "verified_functions_count": 3,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "TraceRebindError"
    ],
    "sample_fail_closed_invariants": [
      "continuity required but no inbound traceparent was extracted at handler entry; A2A client likely captured an empty boot-"
    ],
    "stdlib_dependencies": [
      "__future__",
      "dataclasses",
      "re"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
