{
  "schema_version": "1.3.0",
  "slug": "under-what-conditions-must-an-instance-treat-a-genai-agent-span-s-tool-call-child-as-non-retryable-when-the-parent-span-reports-error-type-timeout",
  "title": "Under what conditions must an instance treat a GenAI agent span's tool-call child as non-retryable when the parent span reports `error.type=timeout`",
  "date_of_record": "2026 November 18",
  "scope": "Applies to OpenTelemetry GenAI semantic conventions (as of the `gen_ai.*` attribute namespace, agent and tool invocation spans) emitted by an agent runtime that issues tool calls as child spans under an `execute_tool` / `invoke_agent` parent. Does not apply to plain HTTP client spans, to non-agent LLM completion spans, or to runtimes that do not emit `gen_ai.operation.name` on both parent and child.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/under-what-conditions-must-an-instance-treat-a-genai-agent-span-s-tool-call-child-as-non-retryable-when-the-parent-span-reports-error-type-timeout.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/under-what-conditions-must-an-instance-treat-a-genai-agent-span-s-tool-call-child-as-non-retryable-when-the-parent-span-reports-error-type-timeout.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/under-what-conditions-must-an-instance-treat-a-genai-agent-span-s-tool-call-child-as-non-retryable-when-the-parent-span-reports-error-type-timeout.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1417,
    "python_slice_tokens": 213,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure is a *semantic conflation between the parent span's termination reason and the child span's retryability*. A parent `invoke_agent` span that ends with `error.type=timeout` and `otel.status_code=ERROR` tells you the *agent turn* exceeded its wall-clock budget. It does **not** tell you that the tool call beneath it failed in a retryable way. The ch...",
    "what_was_observed": "In a traced agent run, the span tree looked like: The retry controller observed the root `error.type=timeout` and re-issued **both** tool calls. `call_a1` (search) was idempotent and harmless. `call_b2` (`db_write`) had *already committed server-side* before the cancellation signal arrived — the child span was `UNSET` precisely because the cancellation raced the write. The retry produced a duplicate write, and becaus...",
    "condition_of_validity": "The \"do not retry the child\" rule is valid **only** when all of the following hold: - The child `execute_tool` span carries its own `otel.status_code` that is not `ERROR`, **or** carries `ERROR` with `error.type` distinct from the parent's. - The child is not marked `retryable` by any explicit attribute (there is no standard `gen_ai.tool.retryable` attribute...",
    "decision_boundary": "The boundary is between *span-level error attribution* and *operation-level retry policy*. Concretely: - **Retry** the child iff `child.status_code == ERROR and child.error_type in {timeout, unavailable, rate_limited}` and the tool is idempotent or carries a caller-supplied idempotency key. - **Do not retry** the child iff `child.status_code in {OK, UNSET}` ...",
    "operational_effect": "Runtimes that violate this boundary exhibit duplicate side effects on non-idempotent tools during agent-turn timeouts — the most common real-world instance being duplicate writes, duplicate emails, or duplicate payment captures when the agent's deadline fires while a tool call is in flight. The blast radius is bounded by the tool's side-effect class, but the..."
  },
  "matched_failure_symptoms": [
    "SUBPROCESS_PIPE_HANG_OR_FD_LEAK"
  ],
  "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": "22fe707eaa88eaef9084b5ad37e68089ae4617b5742ddd227ab6d6fddf94d5a0",
    "verified_classes": [
      "ToolRetryAmbiguityError"
    ],
    "verified_functions": [
      "decide_tool_retry"
    ],
    "verified_functions_count": 1,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "ToolRetryAmbiguityError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
