{
  "schema_version": "1.3.0",
  "slug": "what-happens-when-an-instance-inherits-a-delegated-span-whose-parent-trace-was-sampled-out-mid-hop",
  "title": "What happens when an instance inherits a delegated span whose parent trace was sampled out mid-hop",
  "date_of_record": "2026 November 24",
  "scope": "Applies to multi-hop agent delegation chains (A→B→C) where tracing uses head-based sampling and causal linkage depends on propagated trace context (`traceparent`/`tracestate`, span links, or equivalent). Does not apply to tail-sampled or always-on capture regimes, nor to single-agent tool-call tracing where the root span is always the local orchestrator.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-inherits-a-delegated-span-whose-parent-trace-was-sampled-out-mid-hop.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-inherits-a-delegated-span-whose-parent-trace-was-sampled-out-mid-hop.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-inherits-a-delegated-span-whose-parent-trace-was-sampled-out-mid-hop.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1632,
    "python_slice_tokens": 232,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure is not \"missing spans.\" It is a **causal stitch that resolves to a plausible but wrong parent**. When an upstream hop (say A) is sampled out — because its root decision was made before the delegated subagent B existed — B and its children C still emit spans, because B's runtime is a separate process with its own sampler initialized at cold start....",
    "what_was_observed": "A three-hop delegation: orchestrator A spawns planner B via MCP tool call; B spawns executor C via a second delegated task with a fresh `traceparent` minted from B's context; C performs 40 tool calls and returns. Head-based sampling configured at 10% with the sampler decision made at A's root span creation. Trace of the incident: 1. A's root span is sampled **out** (sampler drew `drop` at root). A's span is never exp...",
    "condition_of_validity": "The re-parenting heuristic is only sound under a condition that is almost never stated explicitly: **every orphan span's true parent is the nearest surviving ancestor in wall-clock time within the same logical trace.** This holds only when (a) trace-ids are globally unique and never truncated before stitching, (b) a trace contains exactly one root, and (c) n...",
    "decision_boundary": "The boundary is between **two legitimate responses to a missing parent**: - *Reconstruct* (re-parent by heuristic) — acceptable only when the trace is used for coarse latency aggregation and the heuristic error is bounded below the aggregation granularity. Never acceptable for verification, replay, or cost attribution. - *Declare incomplete* (orphan + flag) ...",
    "operational_effect": "With parent-based sampling enforced and orphans flagged rather than re-parented: - Orphan rate becomes a *measurable* signal of context-propagation gaps (missing `tracestate`, SDK version skew, MCP transport stripping headers) rather than an invisible corruption. - Verification and replay jobs can refuse to run on `causality_incomplete` traces, converting a ..."
  },
  "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": "2b9f7f89d18ef193bd5c2d6e02a5eb62d8c9ea6dadb92e478730148d957040bb",
    "verified_classes": [
      "CausalityIncompleteError",
      "TraceStitcher"
    ],
    "verified_functions": [
      "assert_replayable",
      "run_replay",
      "__init__",
      "stitch"
    ],
    "verified_functions_count": 4,
    "defensive_guards_count": 1,
    "raised_exceptions": [
      "CausalityIncompleteError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
