{
  "schema_version": "1.3.0",
  "slug": "where-must-an-instance-re-mint-traceparent-when-an-mcp-server-terminates-the-inbound-trace-context-mid-hop",
  "title": "Where must an instance re-mint traceparent when an MCP server terminates the inbound trace context mid-hop",
  "date_of_record": "2026 November 27",
  "scope": "Applies to multi-hop agent systems where a caller agent propagates a W3C `traceparent` header into an MCP tool call, and the MCP server (or an intermediate proxy/gateway) either drops, rewrites, or fails to echo that context into downstream agent-to-agent (A2A) hops or nested MCP calls. Does not apply to single-hop in-process tool invocations where no transport boundary exists, nor to systems using a proprietary correlation scheme with explicit context handoff semantics.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/where-must-an-instance-re-mint-traceparent-when-an-mcp-server-terminates-the-inbound-trace-context-mid-hop.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/where-must-an-instance-re-mint-traceparent-when-an-mcp-server-terminates-the-inbound-trace-context-mid-hop.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/where-must-an-instance-re-mint-traceparent-when-an-mcp-server-terminates-the-inbound-trace-context-mid-hop.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1806,
    "python_slice_tokens": 326,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure is not \"traceparent is missing.\" It is the distinction between **trace continuity** (same `trace-id` across all spans of a logical operation) and **span linkage** (a child `parent-id` that actually points at the span that causally produced the work). W3C `traceparent` encodes both: `version-traceid-parentid-flags`. Most MCP integrations preserve ...",
    "what_was_observed": "A three-hop pipeline: `orchestrator-agent → MCP-server-A → subagent-B → MCP-server-C`. The orchestrator emitted a valid `traceparent` with `trace-id=T`, `parent-id=P0` (its own turn span). MCP-server-A was instrumented with an auto-instrumenting SDK that, on receiving the request, checked for an ambient active span in its own process. None existed (the header arrived as a raw HTTP/gRPC field, not injected into the SD...",
    "condition_of_validity": "The invariant that must hold: **for every span emitted on behalf of a logical agent step, `parent-id` must equal the `span-id` of the specific attempt that causally invoked it, and `trace-id` must be invariant across the entire logical operation including all retries and all MCP/A2A hops.** This holds only when three conditions are simultaneously satisfied: ...",
    "decision_boundary": "The boundary is: **does the receiving MCP server treat the inbound `traceparent` as authoritative context to be continued, or as an opaque string to be forwarded?** - If *continued*: it must extract, validate (version `00`, 32-hex trace-id, 16-hex parent-id, non-zero), and adopt the trace-id while minting a new child span-id. This is correct and preserves li...",
    "operational_effect": "Mis-parented traces destroy three operational capabilities at once: (a) **latency attribution** — you cannot tell whether time was spent in the orchestrator's reasoning, the MCP transport, or the subagent, because the spans are siblings rather than nested; (b) **retry forensics** — duplicate `parent-id` across attempts makes it impossible to distinguish \"the..."
  },
  "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": "a9e77a545cb8f19aee239d1808f6beccc58334708f8a6f85ed82800b83bd429f",
    "verified_classes": [
      "TraceContinuityError"
    ],
    "verified_functions": [
      "parse_traceparent",
      "continue_trace",
      "verify_hop_continuity"
    ],
    "verified_functions_count": 3,
    "defensive_guards_count": 9,
    "raised_exceptions": [
      "TraceContinuityError"
    ],
    "sample_fail_closed_invariants": [
      "traceparent carries all-zero id (invalid)",
      "traceparent version ff is forbidden",
      "no inbound traceparent at MCP hop; refusing to silently root a new trace",
      "outbound parent-id equals inbound parent-id (retry collision or flat linkage)"
    ],
    "stdlib_dependencies": [
      "re"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
