{
  "schema_version": "1.3.0",
  "slug": "how-should-an-instance-propagate-trace-context-when-an-mcp-tool-call-re-enters-the-agent-through-an-a2a-peer-and-the-llm-provider-strips-unknown-heade",
  "title": "How should an instance propagate trace context when an MCP tool call re-enters the agent through an A2A peer and the LLM provider strips unknown headers",
  "date_of_record": "2026 November 16",
  "scope": "Applies to multi-hop agent systems where a single logical request traverses an MCP client/server boundary, an A2A (agent-to-agent) task delegation boundary, and at least one external LLM provider call, and where trace correlation depends on W3C `traceparent`/`tracestate` propagation. Does not apply to single-process agents, to systems where the LLM provider is a first-party service that echoes arbitrary headers, or to trace backends that correlate by a business key rather than by `trace_id`.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-should-an-instance-propagate-trace-context-when-an-mcp-tool-call-re-enters-the-agent-through-an-a2a-peer-and-the-llm-provider-strips-unknown-heade.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-should-an-instance-propagate-trace-context-when-an-mcp-tool-call-re-enters-the-agent-through-an-a2a-peer-and-the-llm-provider-strips-unknown-heade.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-should-an-instance-propagate-trace-context-when-an-mcp-tool-call-re-enters-the-agent-through-an-a2a-peer-and-the-llm-provider-strips-unknown-heade.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1745,
    "python_slice_tokens": 261,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The distinction that matters is between *context propagation* and *context re-establishment*. In a normal OTel deployment, an in-process span and its remote children share a `trace_id` because the `traceparent` header is copied verbatim across every hop. The failure mode here is subtle: every individual hop looks correct in isolation, but the trace fragments...",
    "what_was_observed": "A concrete sequence, abbreviated: 1. Agent A (OTel SDK, `trace_id = T`) receives a user request. It opens span `S1` and calls an MCP tool via a client that injects `traceparent: 00-T-S1-01`. 2. The MCP server (separate process, OTel SDK) correctly extracts the context and creates span `S2` as a child of `S1`. So far, correct. 3. The MCP server, as part of its tool implementation, makes an A2A call to Agent B. The A2A...",
    "condition_of_validity": "The invariant \"a single logical request yields a single trace\" holds **only if** all of the following are true: - Every transport in the chain supports header injection *and* the SDK is configured to use the W3C propagator (`tracecontext`, `baggage`). A2A over JSON-RPC requires explicit metadata carriage; MCP over stdio has no headers at all and must use the...",
    "decision_boundary": "The operational decision is: **at which hop do you re-establish context rather than propagate it?** There are three viable strategies, and the choice is forced by the trust boundary: - **Propagate** (default): correct only when the transport carries headers and no hop strips them. Use for MCP-over-HTTP and A2A-over-HTTP when both SDKs are OTel-wired. - **Re-...",
    "operational_effect": "The effect of getting this wrong is not a crash; it is a *silent instrumentation debt* that surfaces during incident response, when an on-call engineer tries to follow a request across three traces and cannot. The cost is paid at the worst possible time. Teams that discover this after an incident typically add `session_id` retroactively and accept the loss o..."
  },
  "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": "d365a82b62f03227e60bb60804e5a3f149add1a076d162e0d041576d9a4ad79c",
    "verified_classes": [
      "TraceContextFragmentationError"
    ],
    "verified_functions": [
      "assert_single_root",
      "preflight_trace_probe"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "TraceContextFragmentationError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "logging"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
