{
  "schema_version": "1.3.0",
  "slug": "what-happens-when-an-instance-emits-opentelemetry-genai-spans-for-a-tool-call-graph-whose-parent-gen-ai-conversation-id-is-rebound-mid-flight",
  "title": "What happens when an instance emits OpenTelemetry GenAI spans for a tool-call graph whose parent `gen_ai.conversation.id` is rebound mid-flight",
  "date_of_record": "2026 November 30",
  "scope": "Applies to agent runtimes that emit OTel GenAI semantic-convention spans (`gen_ai.operation.name`, `gen_ai.tool.name`, `gen_ai.conversation.id`, `gen_ai.agent.id`, `gen_ai.usage.*`) for multi-step tool-call graphs where a single logical task may span more than one `conversation.id` due to compaction, handoff, or sub-agent delegation. Does not apply to single-turn inference telemetry or to non-GenAI spans.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-emits-opentelemetry-genai-spans-for-a-tool-call-graph-whose-parent-gen-ai-conversation-id-is-rebound-mid-flight.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-emits-opentelemetry-genai-spans-for-a-tool-call-graph-whose-parent-gen-ai-conversation-id-is-rebound-mid-flight.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-emits-opentelemetry-genai-spans-for-a-tool-call-graph-whose-parent-gen-ai-conversation-id-is-rebound-mid-flight.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2371,
    "python_slice_tokens": 425,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "A trace tree is a *causal* structure keyed by `trace_id`/`span_id`. A *conversation* is a *logical* structure keyed by `gen_ai.conversation.id`. The GenAI semantic conventions do not declare an invariant binding these two keys together, but downstream analytics (cost attribution, replay-based evaluation, tool-call success SLOs) silently assume `conversation....",
    "what_was_observed": "A planner agent executes a 9-step tool graph: `search_docs → read_file → read_file → summarize → write_artifact → verify → retry_verify → finalize → emit`. At step 5 the planner's context crosses 82% of the window and the runtime triggers compaction. The compaction routine, following the GenAI convention's guidance that `gen_ai.conversation.id` \"SHOULD be used to correlate spans that belong to the same conversation,\"...",
    "condition_of_validity": "The invariant that downstream analytics relies on is: > For every `trace_id`, the set of distinct `gen_ai.conversation.id` values observed on spans in that trace has cardinality 1, **or** every span carrying a non-primary `conversation.id` has a `gen_ai.operation.name` of `invoke_agent` (i.e., it is an explicit sub-agent boundary) with a `gen_ai.agent.id` di...",
    "decision_boundary": "The runtime must choose, at the moment of rebind, between two mutually exclusive policies: - **Policy P1 (stable partition):** `gen_ai.conversation.id` is immutable for the lifetime of a `trace_id`. Compaction, summarization, and checkpoint-resume *do not* change it. If a new logical conversation is genuinely needed, the runtime must either (a) end the trace...",
    "operational_effect": "Downstream, the effect is that **tool-call success rates, cost-per-success, and replay-based evaluations are computed over a partition that does not match the causal graph**. The error is not random: it systematically attributes the *consequences* of a failure (the retry, the re-verify) to the post-rebind conversation while attributing the *cause* (the origi..."
  },
  "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": "5acb86f1642fc571e981d5b837dc20a5917d00fa0d0cef5876dcaf41e0f952a3",
    "verified_classes": [
      "ConversationFractureError",
      "Span"
    ],
    "verified_functions": [
      "validate_conversation_partition",
      "record_span"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "ConversationFractureError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
