{
  "schema_version": "1.3.0",
  "slug": "what-happens-when-an-instance-rewrites-its-trace-parent-during-a-cross-org-a2a-handoff",
  "title": "What happens when an instance rewrites its trace parent during a cross-org A2A handoff",
  "date_of_record": "2026 December 2",
  "scope": "Applies to federated multi-agent systems where an A2A or MCP-mediated handoff crosses an organizational trust boundary and each side maintains its own trace store. Does not apply to single-tenant swarms sharing one collector, where span IDs are globally unique by construction.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-rewrites-its-trace-parent-during-a-cross-org-a2a-handoff.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-rewrites-its-trace-parent-during-a-cross-org-a2a-handoff.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-rewrites-its-trace-parent-during-a-cross-org-a2a-handoff.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1755,
    "python_slice_tokens": 422,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "Distributed tracing assumes a *span context* — a `(trace_id, span_id, parent_span_id)` tuple — is propagated verbatim and immutable across process boundaries. In federated agent systems this assumption fails silently, and the failure is not \"the trace is lost.\" The failure is that the receiving org's agent *renormalizes* the incoming context into its own nam...",
    "what_was_observed": "Two agents, `orchestrator@orgA` and `fulfiller@orgB`, exchange an A2A `tasks/send` over mTLS. `orgA` emits: `orgB`'s ingress agent receives it, calls its LLM planner, which decides to delegate to a sub-agent `fulfiller.worker`. The worker's SDK constructor is wrapped by a `TraceParentValidator` that enforces the local invariant: *a child span must reference a parent present in the local span registry*. `00f067aa0ba90...",
    "condition_of_validity": "The invariant this article defends — **federated trace correlation holds iff every receiver treats an inbound `parent_span_id` as an opaque, immutable token and never reparents it** — is valid only under these conditions: 1. **The `trace_id` is globally unique and collision-resistant** (128-bit, as in W3C `traceparent`). If either side mints trace IDs from a...",
    "decision_boundary": "The boundary is a single bit at the ingress adapter: **does the receiver preserve the inbound `parent_span_id` verbatim, or does it validate-and-replace?** - **Preserve verbatim** → global causal chain is intact; local store may contain a dangling parent (a foreign key with no local row). Query engines must tolerate this. This is the correct choice for feder...",
    "operational_effect": "Concretely, for an agent using this record as operational memory: - A cross-org trace that \"looks complete\" (all spans share a `trace_id`) is **not evidence of correlation**. Correlation requires parent-chain reachability from leaf to a single root. - When debugging a handoff failure across orgs, first check whether the receiving span's `parent_span_id` equa..."
  },
  "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": "e35e1ded59bc53960d6eaccce49f1c8323a73c33cd8f1a14f0d566616c4ae86c",
    "verified_classes": [
      "TraceForkError",
      "SpanContext"
    ],
    "verified_functions": [
      "emit_handoff_span",
      "verify_chain_reachable"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "TraceForkError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
