{
  "schema_version": "1.3.0",
  "slug": "which-invariants-prevent-causal-trace-stitching-from-silently-forking-at-delegated-sub-agent-boundaries-under-semantic-convention-compliant-observabil",
  "title": "Which invariants prevent causal trace stitching from silently forking at delegated sub-agent boundaries under semantic-convention-compliant observability",
  "date_of_record": "2026 November 25",
  "scope": "Applies to multi-agent systems where an orchestrator delegates to sub-agents and emits observability spans under a shared semantic convention (e.g., `gen_ai.*` / agent-span attributes), with causal linkage via propagated trace/span identifiers. Does not apply to single-process agents emitting a flat, unsplit trace, nor to systems that reconstruct causality purely from wall-clock timestamps.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/which-invariants-prevent-causal-trace-stitching-from-silently-forking-at-delegated-sub-agent-boundaries-under-semantic-convention-compliant-observabil.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/which-invariants-prevent-causal-trace-stitching-from-silently-forking-at-delegated-sub-agent-boundaries-under-semantic-convention-compliant-observabil.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/which-invariants-prevent-causal-trace-stitching-from-silently-forking-at-delegated-sub-agent-boundaries-under-semantic-convention-compliant-observabil.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2493,
    "python_slice_tokens": 456,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "There are two things an observability pipeline can mean by \"the trace is stitched.\" The weak meaning: every emitted span references *some* parent span ID that exists somewhere in the store. The strong meaning, and the only one that preserves causality: every span's parent reference resolves to the *specific span instance* that causally triggered it, within t...",
    "what_was_observed": "An orchestrator agent (`gen_ai.agent.name = \"planner\"`) delegated a retrieval-and-summarize task to a sub-agent (`gen_ai.agent.name = \"retriever\"`) over an A2A-style transport. The sub-agent ran in a separate process with its own OpenTelemetry tracer provider. The delegation payload carried the W3C `traceparent` header, and the sub-agent's SDK *did* extract it — but only when the transport layer surfaced it as a requ...",
    "condition_of_validity": "The invariant that makes stitching sound is: **a delegated sub-agent's root span must be causally parented to the exact orchestrator span instance that issued the delegation, and parent identity must be carried in a channel the sub-agent's propagator actually reads, with a uniqueness constraint that rejects a second root under the same logical delegation.** ...",
    "decision_boundary": "The boundary between \"safe to stitch\" and \"fork risk\" is drawn by answering one question at span-emission time, on the sub-agent side, before the span is exported: - **If the sub-agent is a delegatee and a parent context was supplied in the delegation envelope but not extracted:** the sub-agent must *refuse to emit a root span* and instead emit a span tagged...",
    "operational_effect": "Without the invariant, trace stitching degrades in a way that is invisible until an incident review asks a causal question the data cannot answer. The concrete effects observed: - **Causal edges vanish under partial propagation.** Any delegation path that delivers context on a channel the propagator ignores produces a fork. The fork is silent because both ha..."
  },
  "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": "3459b48540ebc69adfed17158132313ff248ac2537d8835552791af6be326fb8",
    "verified_classes": [
      "TraceForkError",
      "DelegationEnvelope"
    ],
    "verified_functions": [
      "emit_subagent_root_span",
      "stitch_trace",
      "__init__"
    ],
    "verified_functions_count": 3,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "TraceForkError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
