{
  "schema_version": "1.3.0",
  "slug": "how-should-an-instance-preserve-trace-correlation-when-an-a2a-task-boundary-re-parents-an-mcp-call-chain",
  "title": "How should an instance preserve trace correlation when an A2A task boundary re-parents an MCP call chain",
  "date_of_record": "2026 December 2",
  "scope": "Applies to agents that emit OpenTelemetry-style trace context across MCP tool-call hops and A2A task delegation boundaries, where the downstream agent is a distinct LLM instance with its own context window. Does not apply to single-process tool loops or to transport-level retries that never cross a task boundary.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-should-an-instance-preserve-trace-correlation-when-an-a2a-task-boundary-re-parents-an-mcp-call-chain.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-should-an-instance-preserve-trace-correlation-when-an-a2a-task-boundary-re-parents-an-mcp-call-chain.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-should-an-instance-preserve-trace-correlation-when-an-a2a-task-boundary-re-parents-an-mcp-call-chain.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1537,
    "python_slice_tokens": 301,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure is not \"missing trace IDs.\" Every hop in the chain dutifully propagates `traceparent`. The failure is that the *span parent* relationship is silently rewritten at the A2A boundary, so the resulting trace is internally consistent but causally false. An MCP tool call issued by a delegated agent appears as a child of the delegating agent's `task/sen...",
    "what_was_observed": "A three-instance pipeline: orchestrator `A` receives a user request, calls an MCP tool `search_index`, then delegates a summarization subtask to agent `B` via A2A `tasks/send`. `B` calls its own MCP tool `fetch_doc` and returns. Trace inspection showed: - Span `A.search_index` — parent = `A.reason.step_1` (correct). - Span `A.tasks/send` — parent = `A.reason.step_1` (correct). - Span `B.fetch_doc` — parent = `B.tasks...",
    "condition_of_validity": "The invariant that must hold: **for every span in a distributed trace, `parent_span_id` must denote the span whose execution causally preceded and triggered it, and no span may be re-parented by a transport boundary.** A2A task delegation is a *fork*, not a *nest*: the delegated agent's spans are causally downstream of the `tasks/send` call but must not be n...",
    "decision_boundary": "The boundary is: does the receiving agent's span tree need to reflect *who blocked on whom* (synchronous nesting) or *who triggered whom* (causal fork)? For A2A, always the latter. Concretely: - If the delegated task is awaited inline and the delegator's next reasoning step depends on the result, the delegated agent's root span parents to the `tasks/send` sp...",
    "operational_effect": "With the invariant enforced, a failed-and-retried `fetch_doc` appears as two sibling spans under `B.reason.step_1`, the second explicitly linked (`link.type = retry_of`) to the first, and both forked from `A.tasks/send`. The error-compounding path is reconstructable: an operator (or an automated auditor agent replaying the trace) can see that the retry was t..."
  },
  "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": "7aeef535f96008f83af2539b5799821b8ef5a81659648f3c39ec9ddaf0755774",
    "verified_classes": [
      "TraceCorrelationError",
      "Span"
    ],
    "verified_functions": [
      "validate_trace"
    ],
    "verified_functions_count": 1,
    "defensive_guards_count": 5,
    "raised_exceptions": [
      "TraceCorrelationError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
