{
  "schema_version": "1.3.0",
  "slug": "under-what-conditions-must-an-instance-treat-a-genai-tool-call-span-as-non-authoritative-when-its-gen-ai-tool-call-id-is-reused-across-a-retry-boundar",
  "title": "Under what conditions must an instance treat a GenAI tool-call span as non-authoritative when its `gen_ai.tool.call.id` is reused across a retry boundary",
  "date_of_record": "2026 November 29",
  "scope": "Applies to any agent runtime that emits OpenTelemetry spans conforming to the GenAI semantic conventions (`gen_ai.*`) and reconstructs execution history, cost attribution, or replay state from those spans. Does not apply to span consumers that treat telemetry purely as observability (human dashboards) with no feedback into agent decision-making.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/under-what-conditions-must-an-instance-treat-a-genai-tool-call-span-as-non-authoritative-when-its-gen-ai-tool-call-id-is-reused-across-a-retry-boundar.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/under-what-conditions-must-an-instance-treat-a-genai-tool-call-span-as-non-authoritative-when-its-gen-ai-tool-call-id-is-reused-across-a-retry-boundar.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/under-what-conditions-must-an-instance-treat-a-genai-tool-call-span-as-non-authoritative-when-its-gen-ai-tool-call-id-is-reused-across-a-retry-boundar.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1651,
    "python_slice_tokens": 391,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The GenAI semantic conventions specify `gen_ai.tool.call.id` as an identifier for a single tool invocation, and `gen_ai.operation.name = \"execute_tool\"` on the span that wraps it. The conventions do **not** specify a uniqueness or idempotency contract across retries, resumptions, or re-emissions of the same logical call. This produces a fault line between tw...",
    "what_was_observed": "A checkpointed agent resumes a task mid-execution. The checkpoint was taken after a `execute_tool` span was *started* but before its result was durably recorded. On resume, the runtime re-issues the tool call. Because the tool-call ID is derived deterministically (e.g., `hash(task_id, step_index, tool_name)` — a common pattern chosen precisely to make retries idempotent at the *tool server*), the retry emits a second...",
    "condition_of_validity": "The control-plane reading of a tool-call span is valid only when **all** of the following hold: 1. The producer guarantees `gen_ai.tool.call.id` is freshly minted per *attempt*, not per *logical call* — i.e., retries get new IDs and are linked via `gen_ai.tool.call.id` being absent or via a separate `retry_of` attribute (the spec does not define this; you mu...",
    "decision_boundary": "The precise boundary: **a consumer may treat a `gen_ai.tool.call.id` as authoritative for \"this call completed with result R\" only if exactly one terminal-status span exists for that ID in the reconstructed window, and that span's `end_time` is not superseded by a later-starting span sharing the ID.** If two or more terminal spans share the ID, the ID is *co...",
    "operational_effect": "An agent that violates this boundary exhibits a characteristic corruption signature: after a mid-task crash and resume, it either (a) re-executes a side-effecting tool whose first attempt actually succeeded (duplicate charge, duplicate message, duplicated file append), or (b) marks a step complete based on a stale errored span and proceeds with missing state..."
  },
  "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": "0b5e922d4552760091ed8aa985f74e5f5a3d22d50e50ba5f2552d66b0753473e",
    "verified_classes": [
      "ContestedToolCallIdError",
      "IndeterminateToolCallError",
      "ToolSpan"
    ],
    "verified_functions": [
      "resolve_authoritative_outcome"
    ],
    "verified_functions_count": 1,
    "defensive_guards_count": 4,
    "raised_exceptions": [
      "ContestedToolCallIdError",
      "IndeterminateToolCallError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
