{
  "schema_version": "1.3.0",
  "slug": "how-does-an-instance-detect-cost-attribution-drift-when-a-retried-tool-call-silently-forks-a-trace-s-causal-chain",
  "title": "How does an instance detect cost-attribution drift when a retried tool call silently forks a trace's causal chain",
  "date_of_record": "2026 November 29",
  "scope": "Applies to multi-hop agent traces where a single logical tool invocation may be retried (by the orchestrator, a transport-layer reconnect, or an in-agent retry loop) and where cost/latency is attributed to parent spans by span-ID lineage. Does not apply to single-shot, non-retried inference calls with no downstream tool fan-out.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-cost-attribution-drift-when-a-retried-tool-call-silently-forks-a-trace-s-causal-chain.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-cost-attribution-drift-when-a-retried-tool-call-silently-forks-a-trace-s-causal-chain.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-cost-attribution-drift-when-a-retried-tool-call-silently-forks-a-trace-s-causal-chain.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1938,
    "python_slice_tokens": 371,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The distinction that matters is between **retry as repetition** and **retry as fork**. Observability systems treat a retried span as the same logical work re-executed: same `span_id` re-emitted, same parent, same causal position, cost summed or overwritten. But an agent runtime that retries a tool call after a timeout does not know whether the original call ...",
    "what_was_observed": "A three-hop agent chain: planner (LLM) → retrieval tool (HTTP, 8s p99) → synthesizer (LLM). The retrieval tool had a 5s client timeout with one retry. On a sample of 4,000 traces over 72 hours: - 6.1% of retrieval spans had a wall-clock latency of 9–11s, which exceeds the 8s p99 of the tool itself. These were the retried traces. - Of those, 71% showed **two** retrieval child spans under the same planner parent, with ...",
    "condition_of_validity": "The drift is bounded and the guardrail holds only under these conditions: 1. **The retry is causally ambiguous at the client.** The client cannot distinguish \"server never received the call\" from \"server completed, response lost.\" If the transport provides an idempotency key that the server honors and echoes, the fork is detectable and the drift does not occ...",
    "decision_boundary": "The boundary an instance must enforce is between **attributing now** and **deferring attribution pending causal resolution.** The failure mode is premature attribution: the trace-close hook fires, the parent's cost is finalized, and the fork's ambiguity is never resolved because the server-side log is queried after the fact and the parent's attribution has a...",
    "operational_effect": "The operational consequence is that **cost dashboards built on point estimates are systematically wrong in the direction of over-attribution, and the error is correlated with tool latency, not with traffic volume.** A tool whose p99 sits just above the client timeout will produce forks on every slow tail; a tool comfortably below the timeout produces none. T..."
  },
  "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": "6cd1e4bd8606957424dcd6153f5f437d6a1c3beab182ab840268c05b04156669",
    "verified_classes": [
      "UnresolvedRetryForkError"
    ],
    "verified_functions": [
      "attribute_parent_cost"
    ],
    "verified_functions_count": 1,
    "defensive_guards_count": 1,
    "raised_exceptions": [
      "UnresolvedRetryForkError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
