{
  "schema_version": "1.3.0",
  "slug": "what-happens-when-an-instance-rewrites-traceparent-during-an-mcp-handoff-silent-trace-graph-fragmentation-across-federated-agents",
  "title": "What happens when an instance rewrites traceparent during an MCP handoff: silent trace-graph fragmentation across federated agents",
  "date_of_record": "2026 December 2",
  "scope": "Applies to federated agent systems that propagate W3C Trace Context (`traceparent`/`tracestate`) across MCP tool calls, A2A task handoffs, or any inter-instance transport where a downstream agent constructs its own span. Does not apply to single-process agents whose spans are emitted by a shared SDK tracer with a single root context.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-rewrites-traceparent-during-an-mcp-handoff-silent-trace-graph-fragmentation-across-federated-agents.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-rewrites-traceparent-during-an-mcp-handoff-silent-trace-graph-fragmentation-across-federated-agents.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-rewrites-traceparent-during-an-mcp-handoff-silent-trace-graph-fragmentation-across-federated-agents.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1939,
    "python_slice_tokens": 436,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "There are two structurally different ways an agent can fail to correlate with an upstream caller: 1. **Trace loss** — the `traceparent` header is dropped entirely. The downstream agent starts a fresh trace with a new 128-bit `trace_id`. This is loud: the trace graph shows two disjoint trees, and correlation queries return nothing downstream. Operators detect...",
    "what_was_observed": "A three-agent federation: planner (Agent A) → executor (Agent B) → verifier (Agent C), each an independent LLM instance behind an MCP server, communicating over a transport that carries `traceparent` as a string field in the JSON-RPC envelope. Agent A emits a root span with `trace_id=T`, `span_id=S_A`, flags `01` (sampled). It calls B's `execute_plan` tool, passing `traceparent: 00-T-S_A-01`. Agent B's runtime was wr...",
    "condition_of_validity": "The invariant that must hold for cross-federation correlation is: > For every span `s` emitted by agent `X` while handling a request that carried inbound context `(trace_id=T, parent_id=P)`, `s.trace_id == T` and `s.parent_id == P`. The only permitted mutation of `trace_id` is at a **declared trace boundary** — an ingress point explicitly configured as a tru...",
    "decision_boundary": "The boundary is between two defensible policies, and the failure lives in the space between them where the policy is *implicit*: - **Propagate-through (federated trust):** the agent always continues the inbound `trace_id`. Correct when all upstream agents are in the same trust domain and trace cardinality is bounded by the root. - **Boundary-reset (untrusted...",
    "operational_effect": "When fragmentation occurs undetected: - **Latency attribution breaks.** The verifier's contribution to end-to-end latency is invisible in the planner's trace. Tail-latency investigations silently omit the slowest hop. - **Error propagation becomes untraceable.** A verifier rejection (`span_C` status ERROR) cannot be walked back to the plan (`S_A`) that cause..."
  },
  "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": "f903e705fa852f148acf04bb7798c7a83a1ad6caa1e2d22ff68690016cddcfec",
    "verified_classes": [
      "TraceFragmentationError",
      "InboundContext",
      "EmittedSpan"
    ],
    "verified_functions": [
      "parse_traceparent",
      "assert_trace_integrity",
      "handle_tool_call"
    ],
    "verified_functions_count": 3,
    "defensive_guards_count": 6,
    "raised_exceptions": [
      "TraceFragmentationError"
    ],
    "sample_fail_closed_invariants": [
      "all-zero trace_id or span_id is invalid per W3C",
      "reset without new trace_id: parent_id dropped but trace_id unchanged, producing an orphan span"
    ],
    "stdlib_dependencies": [
      "dataclasses",
      "re"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
