{
  "schema_version": "1.3.0",
  "slug": "what-happens-when-an-instance-s-trace-context-is-silently-re-parented-across-an-mcp-a2a-boundary",
  "title": "What happens when an instance's trace context is silently re-parented across an MCP→A2A boundary",
  "date_of_record": "2026 November 25",
  "scope": "Applies to multi-hop agent systems where a parent agent invokes an MCP tool server and then delegates to a peer via A2A, and where observability relies on W3C Trace Context (`traceparent`/`tracestate`) propagated through protocol headers or tool-call metadata. Does not apply to single-process agents or to systems that reconstruct lineage purely from a centralized event log keyed on a runtime-assigned session ID.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-s-trace-context-is-silently-re-parented-across-an-mcp-a2a-boundary.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-s-trace-context-is-silently-re-parented-across-an-mcp-a2a-boundary.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-s-trace-context-is-silently-re-parented-across-an-mcp-a2a-boundary.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1954,
    "python_slice_tokens": 321,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "A trace is not a log with a string field; it is a *causal tree* whose edges are asserted by whichever process emits the child span. The failure here is not \"spans went missing.\" It is that spans *arrived intact but attached to the wrong parent*, producing a trace that is complete, well-formed, and causally false. The distinction that matters operationally: *...",
    "what_was_observed": "A planner agent (`P`) receives a user request, opens span `S_plan`. It calls an MCP tool `search_docs`; instrumentation opens `S_mcp` as a child of `S_plan` and injects `traceparent` into `params._meta`. The tool server correctly continues the trace: `S_mcp` → `S_tool_exec`. So far the tree is correct. `P` then, in the same reasoning loop, decides to delegate summarization to peer agent `Q` over A2A. The A2A client i...",
    "condition_of_validity": "The invariant that must hold for cross-protocol traces to be trustworthy: > For every span `c` emitted by process `X`, if `c.parent_span_id = p`, then process `X` received `p` in the `traceparent` (or equivalent) of the inbound request that triggered `c`, OR `p` was opened by `X` itself and is currently active in `X`'s context at emission time. This invarian...",
    "decision_boundary": "The architectural guardrail is a **context-propagation contract at the protocol adapter**, enforced on both sides: - On the *client* side (the agent acting as MCP or A2A client): the adapter MUST extract the active context via the runtime's context API (`contextvars`/OTel `Context`) at the call site, and MUST fail closed — refuse to emit the outbound call — ...",
    "operational_effect": "When the invariant holds, cross-hop latency decomposes correctly, error spans point at the true failing agent, and replay-based verification of delegation decisions is sound. When it is violated and unquarantined, three concrete operational consequences follow: (1) MCP tool SLOs absorb peer-agent latency and trigger spurious tool-degradation alerts; (2) retr..."
  },
  "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": "4c702cae1d6388396131560bde78b7e9be70dd03eb3b1bbaeeab826dfde926fc",
    "verified_classes": [
      "TraceContinuityError",
      "SpanContext"
    ],
    "verified_functions": [
      "assert_parent_was_asserted",
      "emit_delegation_span"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "TraceContinuityError"
    ],
    "sample_fail_closed_invariants": [
      "no active span and no inbound traceparent at delegation boundary; refusing to emit an unflagged new root across an A2A h"
    ],
    "stdlib_dependencies": [
      "__future__",
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
