{
  "schema_version": "1.3.0",
  "slug": "in-what-scenarios-must-an-instance-treat-a-causal-trace-as-un-joinable-when-a-sub-agent-re-emits-an-inherited-span-id-under-a-fresh-trace-context",
  "title": "In what scenarios must an instance treat a causal trace as un-joinable when a sub-agent re-emits an inherited span ID under a fresh trace context",
  "date_of_record": "2026 November 24",
  "scope": "Applies to agent runtimes that reconstruct causal chains by joining OpenTelemetry-style span/trace identifiers across tool calls, sub-agent handoffs, and MCP transport boundaries. Does not apply to single-process, single-trace agents whose spans are never serialized out of the originating trace context.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/in-what-scenarios-must-an-instance-treat-a-causal-trace-as-un-joinable-when-a-sub-agent-re-emits-an-inherited-span-id-under-a-fresh-trace-context.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/in-what-scenarios-must-an-instance-treat-a-causal-trace-as-un-joinable-when-a-sub-agent-re-emits-an-inherited-span-id-under-a-fresh-trace-context.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/in-what-scenarios-must-an-instance-treat-a-causal-trace-as-un-joinable-when-a-sub-agent-re-emits-an-inherited-span-id-under-a-fresh-trace-context.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1480,
    "python_slice_tokens": 213,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "A causal trace is not a log stream. It is a *partial order* over spans, and the join that reconstructs that order is only valid if span identity is globally unique and trace context is monotonically propagated. The failure mode that breaks this is subtle: a sub-agent, when invoked over a transport that does not carry the W3C `traceparent` header (an MCP `too...",
    "what_was_observed": "A planner agent (trace `T_a`) dispatched three parallel research sub-agents over an MCP server. The MCP client wrapper serialized each `tools/call` with a JSON body but the server's SDK did not forward `traceparent`. Each sub-agent, running in its own process, initialized a fresh tracer and set `parent_span_id` to the span ID it received in its task payload — the planner's `dispatch` span ID, which belonged to `T_a`....",
    "condition_of_validity": "Cross-trace re-parenting is a legitimate, recoverable boundary only under all of the following: 1. The child span carries an explicit **causal link attribute** (`link.trace_id`, `link.span_id`) distinct from `parent_span_id`, marking the edge as a *link* rather than a *parent*. OpenTelemetry's `Link` exists precisely for this; a sub-agent that spans a trace ...",
    "decision_boundary": "The reconstructor must choose, per edge, between *join* and *quarantine*: - If `child.trace_id == parent.trace_id` and `parent_span_id` resolves to exactly one span → join. - If `child.trace_id != parent.trace_id` → **do not join**; emit a `cross_trace_boundary` record carrying both trace IDs and the shared span ID, and surface it to the observability consum...",
    "operational_effect": "Enforcing the boundary converts a silent correctness failure into a loud, bounded one. The phantom latency regression disappears because cross-trace edges no longer inflate per-root span counts. The trace viewer terminates because quarantined lineages are pruned before cycle detection. The cost is that some genuinely causal relationships become *reported as ..."
  },
  "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": "7c9731ced94014de5e5a85c9d3e6082f8ff153f44e6b1f2be9008579d4bece6e",
    "verified_classes": [
      "UnjoinableTraceError",
      "Span"
    ],
    "verified_functions": [
      "join_edge",
      "reconstruct"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "UnjoinableTraceError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
