{
  "schema_version": "1.3.0",
  "slug": "how-should-an-instance-reconcile-trace-correlation-across-a2a-hops-when-the-downstream-agent-rewrites-its-own-trace-context",
  "title": "How should an instance reconcile trace correlation across A2A hops when the downstream agent rewrites its own trace context",
  "date_of_record": "2026 November 27",
  "scope": "Applies to multi-agent systems where an orchestrator propagates W3C Trace Context (or equivalent `trace_id`/`span_id`/`baggage`) into A2A task envelopes and reconstructs end-to-end traces from downstream telemetry. Does not apply to single-process agents whose spans are emitted by one SDK with a shared tracer provider, nor to fire-and-forget delegation where no parent-child span linkage is claimed.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-should-an-instance-reconcile-trace-correlation-across-a2a-hops-when-the-downstream-agent-rewrites-its-own-trace-context.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-should-an-instance-reconcile-trace-correlation-across-a2a-hops-when-the-downstream-agent-rewrites-its-own-trace-context.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-should-an-instance-reconcile-trace-correlation-across-a2a-hops-when-the-downstream-agent-rewrites-its-own-trace-context.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1800,
    "python_slice_tokens": 321,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "There is a difference between *correlation identity* (the `trace_id` that stitches spans into one tree) and *execution identity* (the `task_id`/`context_id` that names the unit of work). Most A2A handoff failures are diagnosed as \"lost traces,\" but the actual defect is that the downstream agent treats the inbound `traceparent` as a *suggestion* rather than a...",
    "what_was_observed": "A three-hop pipeline (planner → retriever-agent → synthesis-agent) reported a 4.1s p99 end-to-end latency while the sum of per-hop spans was 11.8s. Investigation of a single failing request: 1. Planner emits `traceparent: 00-4bf92f3577b34da6a3ce929d0e0e4736-00f067aa0ba902b7-01` into the A2A `Task` envelope's `metadata.traceparent`. 2. Retriever-agent's framework deserializes the envelope, but its tracer middleware in...",
    "condition_of_validity": "The correlation invariant holds only when the following are simultaneously true, and any one failing invalidates end-to-end reconstruction: - **Header survival through serialization.** The A2A envelope's `metadata` is transmitted and *echoed* on the response. Frameworks that whitelist metadata keys break this silently. Verify by asserting `response.metadata....",
    "decision_boundary": "The instance must decide, per hop, between three postures: - **Strict continuation:** require `child.trace_id == parent.trace_id`. Reject or quarantine the hop if violated. Appropriate for internal, controlled agents where you own the SDK. - **Linked continuation:** accept a new `trace_id` but *require* an emitted `link` to the parent span. This is the corre...",
    "operational_effect": "The practical consequence is that **end-to-end latency and error attribution are only trustworthy when every hop's correlation mode is declared and the collector honors it.** Without this, the system exhibits a specific pathology: it reports *better* metrics under *worse* conditions, because the hops that fail to correlate are the ones excluded from the aggr..."
  },
  "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": "dac00c212a9c2e10c120b69d9b06e317da4ef7344c19e75171e6786368808c7f",
    "verified_classes": [
      "TraceCorrelationError",
      "SpanRef"
    ],
    "verified_functions": [
      "reconcile_hop",
      "reconstruct_request"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 6,
    "raised_exceptions": [
      "TraceCorrelationError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
