# What happens when an instance drops W3C traceparent baggage at an organizational boundary and the downstream auditor silently re-roots the trace **Date of Record:** 2026 November 21 **Scope:** Applies to multi-agent pipelines where an agent in org A invokes an agent (via A2A, MCP-over-HTTP, or a tool gateway) in org B, and trace correlation is relied upon for post-hoc verification, cost attribution, or auditor replay. Does not apply to single-tenant traces where all spans share one collector and one trust root. ## Core Distinction There are two different things an agent system calls "trace continuity," and they fail in opposite directions: 1. **Span linkage continuity** — the `traceparent` header (W3C Trace Context, `version-traceid-parentid-flags`) survives the hop, so the downstream span is a child of the upstream span. This is a *structural* invariant: `trace_id` is 16 bytes, `span_id` is 8 bytes, and the child must reference the parent's `trace_id`. 2. **Baggage continuity** — the `baggage` header (key=value pairs, e.g. `warrant.id`, `tenant`, `auditor.nonce`) survives the hop, so downstream agents can attribute the work to the originating warrant and tenant. This is a *semantic* invariant. The non-obvious failure is that **these two invariants are enforced by different code paths, and the standard propagator silently repairs one while destroying the other.** When an agent in org B receives a request whose `traceparent` is valid but whose `baggage` is empty (because org A's egress proxy stripped it, or the caller's OTel SDK was configured with `OTEL_PROPAGATORS=tracecontext` only — omitting `baggage`), the receiving agent does **not** error. It starts a valid, well-formed child span with the correct `trace_id` and `parent_span_id`, and an empty baggage set. The trace *looks* continuous. The warrant is gone. This is the boundary condition: **a structurally valid trace with semantically severed baggage is indistinguishable, at the collector, from a legitimate trace that never had baggage.** The auditor that later joins spans by `trace_id` will happily stitch org A's spans to org B's spans and attribute org B's work to whatever tenant/warrant it can infer — or to none. ## What Was Observed A three-org pipeline: orchestrator (org A) → retrieval agent (org B) → verification auditor (org C). Org A stamps each task with `baggage: warrant.id=, tenant=, auditor.nonce=`. The auditor in org C is a replay verifier: it re-executes the verification step and asserts that the `auditor.nonce` it sees matches the nonce it issued, to detect replay and cross-warrant contamination. Trigger trace: - Org A's OTel SDK was initialized with `OTEL_PROPAGATORS=tracecontext` (the default in several distributions omits `baggage`). The `traceparent` was injected; the `baggage` header was never serialized. - Org B's ingress accepted the request. Its `TraceContextTextMapPropagator.extract()` returned a valid `Context` with a `SpanContext` (trace_id `4bf92f3577b34da6a3ce929d0e0e4736`, parent `00f067aa0ba902b7`). `BaggagePropagator.extract()` returned empty `Baggage`. No exception. No metric. `OTEL_PROPAGATORS` mismatch is invisible at runtime. - Org B executed retrieval, started child spans under the inherited `trace_id`, and forwarded to org C — again injecting `traceparent` (correct) and `baggage` (still empty, because there was nothing to propagate). - Org C's auditor extracted the trace. It found a valid `trace_id` and no `auditor.nonce`. Its replay logic is: *if nonce present, assert match; if nonce absent, treat as first-run and mint a fresh nonce.* The auditor minted a new nonce, re-ran verification, and emitted a span with `auditor.nonce=` under the same `trace_id`. The collector now holds a single trace with two different `auditor.nonce` values: the one org A *believed* it issued (in org A's local log, keyed by the same `trace_id`) and the one org C minted. The join by `trace_id` succeeds. The nonce assertion — the actual security invariant — was never evaluated, because the branch that evaluates it is guarded by the nonce's presence, and absence was silently interpreted as "first run" rather than "propagation failure." The failure is not that the trace broke. The failure is that **the trace didn't break, so nothing alerted.** A dropped `traceparent` would have produced a new `trace_id` at org B and a visible orphan root — noisy, but detectable. A dropped `baggage` produces a perfectly continuous trace that is semantically wrong. ## Condition of Validity The invariant "trace continuity implies warrant continuity" holds **only if** every hop is guaranteed to propagate baggage *and* every receiver is guaranteed to reject requests whose baggage is missing a required key. Neither default holds: - **Propagator set is per-SDK-config, not per-trace.** W3C Trace Context propagation and W3C Baggage propagation are separate propagators composed into a list. The composite propagator that injects `traceparent` may omit `baggage` entirely. The wire format does not signal which propagators the sender used. A receiver cannot distinguish "sender doesn't do baggage" from "sender's egress stripped it" from "no baggage was intended." - **Baggage is unauthenticated by design.** W3C Baggage carries no signature. Any intermediary — proxy, gateway, another agent — can add, drop, or rewrite keys. So even a present `warrant.id` is not a warrant; it is a claim. Cryptographic warrant propagation (signed tokens in a header the agent verifies) is a *different* mechanism that must be layered on; baggage is a routing and correlation hint, not an authorization artifact. - **Absence is not failure by default.** The standard extraction API returns empty baggage without error. The receiver must opt into strictness. The invariant is valid only under the conjunction: (a) all hops inject `tracecontext,baggage`; (b) all receivers run a strict extractor that raises on missing required keys; (c) the required keys are authenticated out-of-band (signed warrant token) because baggage itself is trusted-input-unsafe. If any conjunct is false, trace continuity does **not** imply warrant continuity, and the auditor's nonce-absence branch is a silent bypass. ## Decision Boundary The boundary is between **treating baggage absence as "no claim" versus "claim failed."** For correlation-only keys (`tenant`, `region`) absence is benign — the trace still correlates, attribution degrades gracefully. For **security-bearing keys** (`warrant.id`, `auditor.nonce`, `replay.epoch`) absence must be a hard failure at the receiver, before any side-effecting work, because the downstream branch that handles absence is exactly the branch an attacker or a misconfiguration reaches. Concretely, the receiver must decide at extract time, not at use time: - If the span context is valid but a required security key is absent → raise `BaggageContinuityError` and refuse the hop. Do not mint a replacement nonce. Do not "treat as first run." The first-run branch must be reachable only via an explicit `x-first-run: true` control that is itself authenticated, never via absence. - If the key is present but unauthenticated → verify the signed warrant token before trusting the key. Baggage value is a pointer; the token is the proof. - If the sender's propagator set is unknown → the receiving gateway must assert `baggage` presence at the edge and reject upstreams configured without it. This is a deployment invariant, checked by a synthetic canary trace that carries a probe key and alerts if the probe key fails to arrive. The auditor's replay logic is the sharp edge: its `if nonce is None: mint()` branch is correct only for genuine first runs and is a vulnerability for every propagation drop. Replace it with `if nonce is None: raise`, and route genuine first runs through a signed bootstrap token. ## Operational Effect Without the strict extractor, the pipeline exhibits **silent warrant laundering**: work performed under a dropped warrant is re-attributed under a freshly minted nonce, and the trace join by `trace_id` makes the laundering invisible to every downstream query. Cost attribution over-counts the minting org and under-counts the originating tenant. Auditor replay passes because the replay compares the *minted* nonce to itself. The only artifact that records the truth is org A's local log, which is keyed by `trace_id` and therefore *looks* like it agrees with the collector — until someone diffs `auditor.nonce` values per `trace_id` and finds two. The guardrail is a **strict composite propagator plus an authenticated warrant layer**: 1. Configure every SDK with `OTEL_PROPAGATORS=tracecontext,baggage` and assert it at the gateway with a probe key. 2. At each agent ingress, run a strict extractor that raises on missing required security keys *before* the agent loop starts — not inside a tool. 3. Authenticate security-bearing baggage via a signed token header; treat the baggage value as a lookup key into the verified token, never as the claim itself. 4. Make the auditor's absence branch a hard error; genuine first runs carry a signed bootstrap token, never rely on absence. ```python from __future__ import annotations from dataclasses import dataclass from typing import Mapping, Optional class BaggageContinuityError(RuntimeError): """Raised when a trace is structurally continuous but a required security-bearing baggage key did not survive the organizational hop. This is deliberately NOT a parse error: the traceparent was valid and the child span would have been well-formed. The failure is semantic. """ @dataclass(frozen=True) class ExtractedHop: trace_id: str parent_span_id: str baggage: Mapping[str, str] signed_warrant_token: Optional[str] REQUIRED_SECURITY_KEYS = ("warrant.id", "auditor.nonce", "replay.epoch") def extract_strict(hop: ExtractedHop, verify_token) -> Mapping[str, str]: """Extract-time gate. Must run before any side-effecting agent work. Invariant: a valid span context with missing security baggage is a propagation failure, never a first run. """ if not hop.trace_id or not hop.parent_span_id: # No span context at all: a new root is legitimate, caller decides. raise BaggageContinuityError( "no valid traceparent; refusing to silently re-root across org boundary" ) missing = [k for k in REQUIRED_SECURITY_KEYS if k not in hop.baggage] if missing: # The dangerous branch: trace looks continuous, warrant is gone. raise BaggageContinuityError( f"trace {hop.trace_id} continuous but missing security baggage {missing}; " "refusing hop (do NOT mint a replacement nonce)" ) if not hop.signed_warrant_token: raise BaggageContinuityError( f"trace {hop.trace_id} carries baggage but no signed warrant token; " "baggage values are unauthenticated claims" ) claims = verify_token(hop.signed_warrant_token) for key in REQUIRED_SECURITY_KEYS: if claims.get(key) != hop.baggage[key]: raise BaggageContinuityError( f"trace {hop.trace_id}: baggage {key}={hop.baggage[key]!r} " f"disagrees with signed warrant {claims.get(key)!r}" ) return dict(hop.baggage) def auditor_replay(hop: ExtractedHop, verify_token, reexecute) -> str: """Auditor entrypoint. The absence branch is a hard error by design.""" baggage = extract_strict(hop, verify_token) nonce = baggage["auditor.nonce"] result = reexecute(baggage["warrant.id"], nonce) return result ```