{
  "schema_version": "1.3.0",
  "slug": "in-what-scenarios-must-an-instance-refuse-to-attribute-tool-call-latency-to-the-tool-and-instead-book-it-against-its-own-reasoning-budget",
  "title": "In what scenarios must an instance refuse to attribute tool-call latency to the tool, and instead book it against its own reasoning budget?",
  "date_of_record": "2026 December 2",
  "scope": "Applies to any agent runtime that emits per-span latency and cost telemetry for multi-turn loops where LLM inference and tool execution are interleaved and instrumented by a shared tracer. Does not apply to single-shot RAG calls or to batch inference jobs with no tool loop.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/in-what-scenarios-must-an-instance-refuse-to-attribute-tool-call-latency-to-the-tool-and-instead-book-it-against-its-own-reasoning-budget.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/in-what-scenarios-must-an-instance-refuse-to-attribute-tool-call-latency-to-the-tool-and-instead-book-it-against-its-own-reasoning-budget.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/in-what-scenarios-must-an-instance-refuse-to-attribute-tool-call-latency-to-the-tool-and-instead-book-it-against-its-own-reasoning-budget.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1456,
    "python_slice_tokens": 220,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure mode is a **misattribution of wall-clock latency across the reasoning/tool seam**. In a traced agent loop, each turn produces at least two span types: an *inference span* (the model call, ending when the final token is emitted or the tool-call block is parsed) and a *tool span* (the external call, from dispatch to response). Naive tracers measure...",
    "what_was_observed": "A tool-loop agent (`search_documents` + `summarize`) showed a bimodal tool-latency distribution: a stable ~180ms mode and a fat ~2.4s mode. The 2.4s mode correlated with turns where the model requested the tool with a *large structured argument* (a 40–60 field filter object). Investigation of the trace: 1. The inference span closed on `finish_reason == tool_calls`, timestamped at the last token. 2. The tool span open...",
    "condition_of_validity": "Tool-latency attribution is valid **iff** the tracer can emit a `dispatch_ready` timestamp that is causally downstream of the model's final tool-call token and upstream of any runtime-side argument processing, *and* the tool span opens at `dispatch_ready` rather than at `dispatch()`. Concretely, three conditions must all hold: - The inference span's close ti...",
    "decision_boundary": "The boundary is **whether the pre-dispatch segment is model-shaped or tool-shaped**. Model-shaped work — token parsing, schema conformance of model-emitted arguments, guardrail evaluation of model-emitted content — scales with model output and belongs to the reasoning budget even though it executes in runtime code. Tool-shaped work — connection setup, retry ...",
    "operational_effect": "Enforcing the invariant changed the tool p99 from 2.4s to 210ms and moved ~2.1s per affected turn into the reasoning budget, which is where it belongs — the model's argument verbosity is a *reasoning* cost, and the fix is prompt/schema tightening, not tool replacement. The cost ledger now reconciles: inference tokens + tool wall-clock + pre-dispatch runtime ..."
  },
  "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": "e8640c562afa94d3a88c201adac60b11905f2f248be29f4c018d6de285a06078",
    "verified_classes": [
      "AttributionConservationError",
      "TurnTrace"
    ],
    "verified_functions": [
      "reconcile_turn",
      "emit_tool_sample"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "AttributionConservationError"
    ],
    "sample_fail_closed_invariants": [
      "zero-duration turn cannot be attributed"
    ],
    "stdlib_dependencies": [
      "dataclasses"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
