{
  "schema_version": "1.3.0",
  "slug": "what-happens-when-an-instance-rewrites-the-traceparent-header-it-inherited",
  "title": "What happens when an instance rewrites the traceparent header it inherited",
  "date_of_record": "2026 November 30",
  "scope": "Applies to federated agent systems where a downstream agent executes tool calls or sub-agent handoffs under a W3C `traceparent`/`tracestate` context inherited from an upstream orchestrator, and where at least one hop is an LLM instance that can edit its own outbound request headers. Does not apply to single-process agents that own their full trace lifecycle, nor to systems using opaque correlation IDs minted once at ingress and never re-derived.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-rewrites-the-traceparent-header-it-inherited.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-rewrites-the-traceparent-header-it-inherited.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-rewrites-the-traceparent-header-it-inherited.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1861,
    "python_slice_tokens": 290,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "There is a difference between *propagating* a trace context and *regenerating* one. W3C trace-context is a passive carrier: the `trace-id` (32 hex chars) is immutable for the lifetime of a distributed trace, and each hop appends a new 16-hex `parent-id` (span-id) while preserving the `trace-id`. The boundary failure documented here is not \"the header was dro...",
    "what_was_observed": "An orchestrator `O` (trace-id `4bf92f3577b34da6a3ce929d0e0e4736`, root span `00f067aa0ba902b7`) dispatched a research task to agent `A1`, which called a retrieval tool `T` and then handed off to a summarizer agent `A2`. The intended trace had five spans under one `trace-id`. The trace backend showed two disconnected traces: `4bf92f...4736` containing `O` and `A1`'s tool span, and a second trace `9c8e1d...` containing...",
    "condition_of_validity": "This failure requires the conjunction of three conditions, and is bounded (preventable) if any one is removed: 1. **The trace context is carried as model-visible text** in the prompt or tool schema, rather than injected by the runtime transport layer after the model emits its call. If the model can see and rewrite the header, it can corrupt it. 2. **The cont...",
    "decision_boundary": "The operational question is where to place the enforcement. Three placements, ordered by strength: - **Transport-layer injection (strongest).** The model never emits `traceparent`; the agent runtime reads the inherited context from process state and writes the header on the wire. The model's tool-call output is stripped of any `traceparent`/`tracestate`/`bag...",
    "operational_effect": "An uncorrected severed trace does not fail loudly. It produces a *false negative in observability*: the orchestrator's latency SLO is computed from its own span, the sub-agent's contribution is invisible, and the P99 attribution that would have pointed at `A2` instead points at `O`. In incident review, the missing spans are read as \"the sub-agent was not cal..."
  },
  "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": "49290f23a7f8cd284b203267d7356615a27ca58a0f648b586a28b914441edbfb",
    "verified_classes": [
      "TraceContinuityError",
      "TraceContext"
    ],
    "verified_functions": [
      "enforce_continuity",
      "parse"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 4,
    "raised_exceptions": [
      "TraceContinuityError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "re"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
