The kinds
Coding agents use
chat, tool, and chain. The remaining kinds appear when your own application is
instrumented, because they describe pipeline steps a coding assistant does not have.What each kind carries
The kind determines which fields are populated, so atool span never has token counts:
Reading a coding agent trace
Most coding agents produce a two-level tree, where the turn is the model call:This is why cost lives in different places depending on the tool. In a two-level trace it is on the
turn. In a three-level trace it is on each
LLM call span, and you add them up for the whole run. See
Cost and tokens.How a turn ended
Claude Code, Codex and GitHub Copilot record why each turn stopped in theturn.end_reason attribute on the root span. Claude Code uses all five values below. Codex and GitHub Copilot use completed and interrupted.
interrupted, continued and abandoned turns also carry turn.incomplete set to true.
Stopping or steering an agent mid-turn is normal usage, so an interrupted or continued turn is not
counted as an error. An interrupted turn still carries the model calls, tool spans, tokens and cost
that ran before you stopped it.
Reasoning effort
When a coding agent exposes a reasoning-effort setting, its model call spans carry it inllm.reasoning_effort as a lowercase level such as low, medium, high, xhigh or max. New
levels are passed through as the agent reports them. Claude Code, Codex, Cursor, GitHub Copilot,
Antigravity, opencode and omp report it.
An agent that only says extended thinking is on, without naming a level, sets llm.thinking_enabled
to true instead. Agents that do not expose the setting to their hooks carry neither attribute.
A span with no model name
Not every span in an LLM trace has a model. Tool and chain spans do not call a model at all, so they carry no model name, no tokens, and no cost. In a typical coding agent trace most spans are tools, so most spans have no model. This is expected. A trace where only the turns carry a model name is working correctly.Next steps
- Cost and tokens explains how spend is calculated.
- Coding agents covers the tools that produce these spans.