{
  "schema_version": "1.3.0",
  "slug": "how-should-an-instance-reconcile-causal-trace-stitching-when-a-delegated-subtask-s-span-parent-is-a-synthetic-re-entry-point-rather-than-the-original",
  "title": "How should an instance reconcile causal trace stitching when a delegated subtask's span parent is a synthetic re-entry point rather than the original handoff?",
  "date_of_record": "2026 November 29",
  "scope": "Applies to agent runtimes that propagate W3C-style trace context (trace-id/span-id/parent-span-id) across delegated task handoffs and reconstruct a causal DAG post-hoc for observability. Does not apply to single-process, single-agent runs where all spans share one in-process tracer with no delegation boundary.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-should-an-instance-reconcile-causal-trace-stitching-when-a-delegated-subtask-s-span-parent-is-a-synthetic-re-entry-point-rather-than-the-original.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-should-an-instance-reconcile-causal-trace-stitching-when-a-delegated-subtask-s-span-parent-is-a-synthetic-re-entry-point-rather-than-the-original.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-should-an-instance-reconcile-causal-trace-stitching-when-a-delegated-subtask-s-span-parent-is-a-synthetic-re-entry-point-rather-than-the-original.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1729,
    "python_slice_tokens": 324,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure is not \"missing spans\" or \"dropped telemetry.\" It is a *topological* corruption: a delegated subtask emits spans whose `parent_span_id` points at a **synthetic re-entry span** — a span the orchestrator fabricates when it resumes a paused agent from a checkpoint — instead of the original handoff span that actually caused the work. The trace is com...",
    "what_was_observed": "An orchestrator `O` accepts a task, emits span `S0` (trace `T`), and delegates to worker `W1` via a handoff message carrying `traceparent: 00-T-S0-01`. `W1` begins work, emits `S1` (parent `S0`), then hits a context-window checkpoint: it serializes its episodic state and suspends. The orchestrator's resume controller later rehydrates `W1` from the checkpoint. Critically, the resume path constructs a *new* runtime con...",
    "condition_of_validity": "The invariant that must hold: **for any span emitted after a checkpoint resume, `parent_span_id` must resolve to the last span the agent emitted before suspension in the same logical task, or to the handoff span that originated the task — never to a span minted by the resume controller.** This holds only when the resume controller treats checkpoint state as ...",
    "decision_boundary": "When the runtime detects a resume (checkpoint load) *and* the loaded state lacks a persisted `traceparent`, it faces a choice: 1. **Mint a new root** (`S_synth`, `parent = null`) — keeps the trace-id stable but breaks the causal edge. Cheap, wrong for causality. 2. **Re-attach to the handoff span** — requires the checkpoint to have stored the originating `tr...",
    "operational_effect": "Consequences of the silent-root path: - **Attribution inversion:** post-resume errors are attributed to the resume controller, not the delegation that caused them. On-call engineers chase the wrong subsystem. - **Latency truncation:** cross-checkpoint p99 is computed only over the post-resume component; the pre-checkpoint leg's duration is dropped from the c..."
  },
  "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": "9566b7ac9e233a7d2e960d47f23403c1667f0f76bcf11fed2ef6c395bf7de80c",
    "verified_classes": [
      "TraceContinuityError",
      "Checkpoint",
      "HandoffLog"
    ],
    "verified_functions": [
      "resume_agent",
      "emit_resumed_span",
      "lookup_traceparent",
      "__post_init__"
    ],
    "verified_functions_count": 4,
    "defensive_guards_count": 1,
    "raised_exceptions": [
      "TraceContinuityError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
