{
  "schema_version": "1.3.0",
  "slug": "why-does-an-instance-lose-causal-attribution-when-trace-ids-are-re-minted-at-the-tool-boundary",
  "title": "Why does an instance lose causal attribution when trace IDs are re-minted at the tool boundary?",
  "date_of_record": "2026 November 22",
  "scope": "Applies to agent runtimes that correlate LLM spans, agent-step spans, and tool-execution spans through distributed trace context (W3C `traceparent`/`tracestate`) propagated across process and network boundaries. Does not apply to single-process, single-threaded agents where all spans share one in-memory tracer and one root span.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/why-does-an-instance-lose-causal-attribution-when-trace-ids-are-re-minted-at-the-tool-boundary.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/why-does-an-instance-lose-causal-attribution-when-trace-ids-are-re-minted-at-the-tool-boundary.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/why-does-an-instance-lose-causal-attribution-when-trace-ids-are-re-minted-at-the-tool-boundary.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1930,
    "python_slice_tokens": 357,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "There are two different things an observability pipeline calls \"correlation.\" The first is **identity correlation**: the ability to join spans that belong to the same logical request by a shared trace ID. The second is **causal correlation**: the ability to reconstruct the *ordering and dependency* of spans—which model call produced the tool invocation, whic...",
    "what_was_observed": "A multi-step agent executing a retrieve-then-summarize task produced the following span set in the tracing backend, all tagged with the same logical request ID at the collector: - `agent.step` span, `span_id=A1`, `parent_span_id=root`, start `t=0ms` - `llm.completion` span, `span_id=B2`, `parent_span_id=A1`, start `t=12ms`, end `t=840ms` - `tool.call` span, `span_id=C3`, `parent_span_id=B2`, start `t=845ms`, end `t=2...",
    "condition_of_validity": "The invariant that must hold for causal correlation to be trustworthy: > For every span `S` emitted by an agent step, `S.parent_span_id` must reference the span that *logically produced* `S`, and the `traceparent` propagated into any tool or sub-agent invocation must be the *same* trace context as the invoking span, with `parent-id` set to the invoking span'...",
    "decision_boundary": "The operational decision is whether to treat a re-minting tool adapter as a **correlation-preserving** or **correlation-severing** boundary. The rule: - If the adapter forwards `traceparent` unchanged (adjusting only `parent-id` to the current span), it is preserving. No special handling. - If the adapter must mint a new trace (third-party isolation, legal b...",
    "operational_effect": "When this invariant is enforced, incident triage can answer \"which model output drove this tool call\" in one graph hop, and replay-based verification can reconstruct the exact reasoning chain. When it is violated and undetected, the observability layer produces *confidently wrong* causal graphs: coverage dashboards stay green, span counts match, and only the..."
  },
  "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": "574e46f64b7839de993b5ea0aa5b34dc337f5d4a841647dacb6e8de7cbd3d4ec",
    "verified_classes": [
      "CausalLinkSeveredError",
      "Span"
    ],
    "verified_functions": [
      "assert_causal_link",
      "validate_trace"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 6,
    "raised_exceptions": [
      "CausalLinkSeveredError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "time"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
