{
  "schema_version": "1.3.0",
  "slug": "when-must-an-instance-refuse-to-close-a-causal-span-orphaned-handoff-attribution-in-multi-agent-observability-traces",
  "title": "When must an instance refuse to close a causal span: orphaned handoff attribution in multi-agent observability traces",
  "date_of_record": "2026 November 24",
  "scope": "Applies to distributed tracing of multi-agent LLM systems where a parent agent emits a span, delegates to a child instance whose execution is traced by a separate emitter (different process, runtime, or vendor), and the trace is reconstructed by span-ID linkage. Does not apply to single-process, single-emitter traces where parent and child share one tracer object and one clock.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/when-must-an-instance-refuse-to-close-a-causal-span-orphaned-handoff-attribution-in-multi-agent-observability-traces.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/when-must-an-instance-refuse-to-close-a-causal-span-orphaned-handoff-attribution-in-multi-agent-observability-traces.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/when-must-an-instance-refuse-to-close-a-causal-span-orphaned-handoff-attribution-in-multi-agent-observability-traces.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1765,
    "python_slice_tokens": 352,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The naive model treats a span as closed when the emitting instance returns from the delegated call. The correct model is: a parent span may only be *closed* (marked `end_time` set, status finalized) when every child span it causally spawned has either been received-and-linked or explicitly tombstoned as `MISSING`. These are different invariants. \"The call re...",
    "what_was_observed": "A three-tier pipeline: a planner agent (emitter A, in-process tracer), a tool-invocation agent (emitter B, sidecar with its own OTel SDK and its own wall clock), and a verifier agent (emitter C, remote, batch-flushed every 30s). Planner delegates to tool-agent via an MCP `tools/call`; tool-agent delegates to verifier via A2A `tasks/send`. Each hop carries a W3C `traceparent` in metadata. The trace below is representa...",
    "condition_of_validity": "The invariant \"a parent span is closed only when all causal children are accounted for\" is only enforceable under a bounded, explicit contract. It holds when: 1. **Every handoff carries a span-ID the parent can enumerate before closing.** If the parent issues N delegations, it must hold N child span IDs (or N reservation tokens) before writing its terminal r...",
    "decision_boundary": "The boundary is between **late-link (repair)** and **tombstone (declare loss)**. An instance must not attempt to link a child span to a parent it has already finalized unless it can do so without invalidating a published causal graph. Concretely: - If the parent is still `OPEN` (not yet flushed to consumers) and the child arrives within deadline: link, updat...",
    "operational_effect": "Enforcing this invariant changes three downstream behaviors. First, failure-mode taxonomies must classify on `status` and on *collector-observed* span duration, never on emitter-reported duration when the emitter batches—otherwise flush latency is misattributed as execution latency, inflating timeout and cost buckets. Second, handoff attribution becomes a fi..."
  },
  "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": "3d9d72dfa71e82530389c8c6d214014644fc2ae903608fdbe48406f8031ad56f",
    "verified_classes": [
      "SpanState",
      "CausalIntegrityError",
      "Span",
      "TraceCollector"
    ],
    "verified_functions": [
      "__init__",
      "reserve_child",
      "close_span",
      "receive_child"
    ],
    "verified_functions_count": 4,
    "defensive_guards_count": 4,
    "raised_exceptions": [
      "CausalIntegrityError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "enum",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
