{
  "schema_version": "1.3.0",
  "slug": "how-should-an-instance-treat-a-missing-gen-ai-tool-call-id-on-a-resumed-span-as-a-hard-continuity-fault-rather-than-a-cosmetic-attribute-gap",
  "title": "How should an instance treat a missing `gen_ai.tool.call.id` on a resumed span as a hard continuity fault rather than a cosmetic attribute gap",
  "date_of_record": "2026 November 29",
  "scope": "Applies to any agent runtime that emits OpenTelemetry GenAI semantic-convention spans (`gen_ai.operation.name`, `gen_ai.tool.name`, `gen_ai.tool.call.id`, `gen_ai.usage.*`) and reconstructs execution state from a span exporter after a mid-task checkpoint/resume. Does not apply to stateless single-shot inference where no span is replayed into a resumed context.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-should-an-instance-treat-a-missing-gen-ai-tool-call-id-on-a-resumed-span-as-a-hard-continuity-fault-rather-than-a-cosmetic-attribute-gap.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-should-an-instance-treat-a-missing-gen-ai-tool-call-id-on-a-resumed-span-as-a-hard-continuity-fault-rather-than-a-cosmetic-attribute-gap.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-should-an-instance-treat-a-missing-gen-ai-tool-call-id-on-a-resumed-span-as-a-hard-continuity-fault-rather-than-a-cosmetic-attribute-gap.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1579,
    "python_slice_tokens": 220,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "There are two ways a `gen_ai.tool.call.id` can be absent from a span, and conflating them is the failure mode. The first is *pre-execution absence*: the agent decided to call a tool, the span was opened, but the call never dispatched (budget exhaustion, model abort, policy block). Here a missing call id is legitimate — there was no tool invocation to correla...",
    "what_was_observed": "A planner instance (`gen_ai.agent.id=p-7741`) ran a 14-step task. At step 9 it invoked `write_file` through an MCP client. The span was opened with `gen_ai.operation.name=\"execute_tool\"`, `gen_ai.tool.name=\"write_file\"`, and a `gen_ai.tool.call.id` of `call_9f2a`. The tool executed and returned `ok`. The process was then checkpointed and killed before the span was ended — the span exporter had flushed the *start* eve...",
    "condition_of_validity": "The invariant that must hold for a resumed instance to trust a tool-call span as a reconciliation key: > For every span where `gen_ai.operation.name == \"execute_tool\"` and the span's status indicates completion or the tool is known to be side-effecting, `gen_ai.tool.call.id` MUST be present and MUST be assigned at *dispatch* time (before the tool executes), ...",
    "decision_boundary": "The boundary is between *reconcile* and *re-execute*: - If the span has `gen_ai.tool.call.id` → reconcile against the tool's idempotency ledger using that id. Re-execution is safe only if the ledger confirms no effect. - If the span lacks the id AND the tool is side-effecting → **do not re-execute.** Escalate to a human or a dedicated reconciler that can ins...",
    "operational_effect": "The operational consequence is that a schema-valid span store is not a sufficient basis for resume. The GenAI conventions are observability conventions, not a transaction log; they were designed so a human can read a trace, not so an agent can replay one. Treating them as a replay log imports exactly this boundary failure: the attributes that are \"optional\" ..."
  },
  "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": "778c23cd96a45493962473b7cd994a3ea272cfbcc0656cf72f7d446c1b73b3f1",
    "verified_classes": [
      "ContinuityFault",
      "Span"
    ],
    "verified_functions": [
      "validate_resume_window",
      "resume_step"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 1,
    "raised_exceptions": [
      "ContinuityFault"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
