{
  "schema_version": "1.3.0",
  "slug": "why-does-an-instance-inherit-a-parent-agent-span-s-token-budget-but-not-its-exhausted-budget-signal-under-opentelemetry-genai-semantic-conventions",
  "title": "Why does an instance inherit a parent agent span's token budget but not its exhausted-budget signal under OpenTelemetry GenAI semantic conventions",
  "date_of_record": "2026 November 28",
  "scope": "Applies to multi-process or multi-service agent topologies where a parent agent span is exported with `gen_ai.usage.input_tokens` / `gen_ai.usage.output_tokens` and a child instance (sub-agent, tool-runner, or resumed worker) is reconstructed from the parent's exported span context via W3C `traceparent` propagation. Does not apply to single-process in-memory agents that share a live object graph, nor to billing reconciliation that reads the vendor invoice directly rather than the span stream.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/why-does-an-instance-inherit-a-parent-agent-span-s-token-budget-but-not-its-exhausted-budget-signal-under-opentelemetry-genai-semantic-conventions.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/why-does-an-instance-inherit-a-parent-agent-span-s-token-budget-but-not-its-exhausted-budget-signal-under-opentelemetry-genai-semantic-conventions.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/why-does-an-instance-inherit-a-parent-agent-span-s-token-budget-but-not-its-exhausted-budget-signal-under-opentelemetry-genai-semantic-conventions.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2087,
    "python_slice_tokens": 301,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The GenAI semantic conventions define token usage as a *terminal, additive measurement* attached to a span at close time, and define trace context as a *causal linkage* propagated at open time. These two properties travel on different clocks. A child span that inherits `traceparent` inherits the causal edge — it can read the parent's `gen_ai.usage.*` attribu...",
    "what_was_observed": "A planner agent (`gen_ai.operation.name = \"invoke_agent\"`, `gen_ai.agent.name = \"planner\"`) spawned three sequential sub-agents, each as a separate container, each receiving the planner's `traceparent`. The planner had a hard per-task budget of 200k input tokens enforced by a local counter. At 187k consumed, the planner dispatched a fourth sub-agent and then, in the same turn, exceeded its budget and was killed by it...",
    "condition_of_validity": "The invariant \"a child can derive its remaining budget from its parent's exported usage\" holds **only** under all of the following: - The parent span closed with `status.code = OK` *and* the parent process is known to have terminated voluntarily (not killed). - The budget is *per-span-tree* and the parent's usage is the *only* prior consumption in that tree ...",
    "decision_boundary": "The correct architectural move is to **stop deriving budget state from telemetry and start propagating it as control-plane metadata.** Concretely: - Budget authority lives in a **budget service** (or a signed field in the handoff payload), not in span attributes. The child asks \"how much do I have?\" and receives an answer with an epoch/lease, not a subtracti...",
    "operational_effect": "Downstream of this boundary, three operational consequences follow: 1. **Budget overshoot is silent and bounded only by kill latency.** The child does not know it is over budget until the supervisor's next poll. In the observed case, the overshoot window was ~2.3s and 28k tokens; under a slower supervisor poll it scales linearly with poll interval. 2. **Cost..."
  },
  "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": "148e0aaa0a80b17d26b574ec5cee0c70b4ee9a7fa95dc85d51c8b918bce331f8",
    "verified_classes": [
      "BudgetReconstructionError",
      "ParentSpanUnusable"
    ],
    "verified_functions": [
      "derive_remaining_budget",
      "request_budget_lease"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 7,
    "raised_exceptions": [
      "BudgetReconstructionError",
      "ParentSpanUnusable"
    ],
    "sample_fail_closed_invariants": [
      "budget authority must come from the budget service with an explicit lease; do not reconstruct from gen_ai.usage.* span a",
      "parent span absent from collector; child would default to full budget",
      "parent span not yet flushed (BatchSpanProcessor delay); read is stale",
      "parent terminated by supervisor; span status does not encode exhaustion"
    ],
    "stdlib_dependencies": [],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
