# How to see which model handled each turn, and what it cost

> Use AutoRouter, the Mac app for all your coding agents: while it is the model selected, every turn shows its model, what it cost and why. Natively, Claude Code's OpenTelemetry logs the model and estimated cost of every request, and a prompt.id groups them into turns; claude -p --output-format json reports cost by model for one run. In Codex, codex exec --json reports each turn's tokens, which you price with OpenAI's credit rates.

Authors: AutoRouter
Author profile: https://autorouter.com/about
Published: 2026-11-28T19:50:00.000Z
Reading time: 8 min
Canonical: https://autorouter.com/blog/see-what-each-turn-costs
Part of: How to cut Claude Code and Codex costs (https://autorouter.com/blog/cut-claude-code-and-codex-costs.md)
Publisher: AutoRouter (https://autorouter.com)

![AutoRouter shows each request's model, cost and why. Where do you need the cost? Scripted Claude Code run: claude -p --output-format json. Interactive Claude Code: OpenTelemetry, grouped by prompt.id. Codex: codex exec --json, then price tokens. Any coding agent: AutoRouter: model, cost and why. Source: Anthropic's Claude Code docs and OpenAI's Codex docs, checked November 28, 2026, and AutoRouter.](https://autorouter.com/blog/images/see-what-each-turn-costs/1-where-to-look.png)

To see which model handled a turn and what it cost, use [AutoRouter](https://autorouter.com), the Mac app for all your coding agents: while it is the model selected, every turn shows its model, the cost and the reason. Natively, read each request's record in Claude Code and each turn's token report in Codex. In Claude Code, OpenTelemetry logs the model and estimated cost of every API request, and a `prompt.id` ties those requests to the prompt that caused them; for a scripted run, `claude -p --output-format json` reports the cost by model ([Anthropic](https://code.claude.com/docs/en/monitoring-usage)). In Codex, `codex exec --json` reports each turn's tokens, and you price them with OpenAI's published credit rates, because Codex reports no cost of its own ([OpenAI](https://learn.chatgpt.com/docs/non-interactive-mode)).

AutoRouter wrote this post. Everything about Claude Code and Codex comes from Anthropic's and OpenAI's documentation, checked November 28, 2026, and linked where it is used.

## Why can one session use more than one model?

Because the model you picked is not always the model that answered. In Claude Code, the `opusplan` setting uses Opus while planning and Sonnet while carrying out the plan, subagents can run on a model of their own, and a fallback model chain switches models for the current turn only when the primary is unavailable. Some requests that a Fable model, Opus 5.5, Sonnet 5.5 or Opus 5 flags for cybersecurity or biology re-run on an older model, such as Opus 5, Opus 4.8 or Sonnet 5, with a notice in the transcript, and the session carries on there ([Anthropic](https://code.claude.com/docs/en/model-config)). In Codex, a `/model` switch changes the model for the turns after it ([OpenAI](https://learn.chatgpt.com/docs/developer-commands)).

So a session total tells you what the session spent, and nothing about which turn spent it. [How to use plan mode in Claude Code](/blog/claude-code-plan-mode) and [multi-agent Claude Code](/blog/claude-code-multi-agent) cover the two most common reasons a Claude Code session mixes models.

## How do you see which model Claude Code used?

Run `/status` or add a status line for the current model, and run `/usage` for a session's tokens by model. The status line script receives `model.id` and `model.display_name` on every update, and `/status` shows the model next to your account information ([Anthropic](https://code.claude.com/docs/en/model-config)). The Session block in `/usage` has a `Usage by model` line with input, output and cache tokens for each model the session touched ([Anthropic](https://code.claude.com/docs/en/costs)).

Neither tells you which turn a model handled. A fallback chain is the hardest case: `/status` doesn't show the chain, and the notice when a switch happens is the only sign of it ([Anthropic](https://code.claude.com/docs/en/model-config)). [How to check your Claude Code usage](/blog/check-claude-code-usage) covers `/usage` and the status line in full.

## How do you see what one Claude Code turn cost?

Export Claude Code's OpenTelemetry events and add up the `claude_code.api_request` events that share a `prompt.id`. Claude Code logs one `api_request` event for every request to Claude, with the `model`, an estimated `cost_usd`, the input, output and cache token counts, `duration_ms`, and a `query_source` that says whether the main thread, compaction or a named subagent made the request. One prompt can make several requests, and `prompt.id` links all of them, along with the tool results in between ([Anthropic](https://code.claude.com/docs/en/monitoring-usage)).

1. Turn on telemetry and point the log exporter at an OpenTelemetry collector. Set these in your shell or in the `env` block of `~/.claude/settings.json`; Claude Code ignores them in a repository's `.claude/settings.json`.
2. Start `claude` and work as usual. Logs export every five seconds by default.
3. In your observability tool, filter `api_request` events by one `prompt.id`, group them by `model`, and sum `cost_usd` and the token counts. That is the turn.

```bash
export CLAUDE_CODE_ENABLE_TELEMETRY=1
export OTEL_LOGS_EXPORTER=otlp
export OTEL_EXPORTER_OTLP_PROTOCOL=grpc
export OTEL_EXPORTER_OTLP_ENDPOINT=http://localhost:4317
claude
```

For a single scripted turn, skip the collector. With `--output-format json`, `claude -p` returns `total_cost_usd` and a per-model breakdown in `modelUsage` ([Anthropic](https://code.claude.com/docs/en/headless)):

```bash
claude -p "Write a one-line commit message for the staged diff" --output-format json \
  | jq '{cost: .total_cost_usd, models: .modelUsage}'
```

Every one of these dollar figures is an estimate. Claude Code computes it locally at list price unless your organization sets a `modelPricing` table, and on a Pro, Max or Ultra plan the turn draws on plan limits, which the `/usage` bars show ([Anthropic](https://code.claude.com/docs/en/costs)). The estimate still answers the useful question: which turns are expensive, and on which model.

## How do you see the model and tokens of each Codex turn?

Run `/status` for the active model and the session's token usage, and use `codex exec --json` when you need tokens turn by turn. `/usage` shows your account's token activity by day or week, with no model or turn breakdown. `/statusline` can keep the model, reasoning level and token counters in the footer, saved to `tui.status_line` in `config.toml` ([OpenAI](https://learn.chatgpt.com/docs/developer-commands)). With `--json`, `codex exec` streams events as JSON Lines, and each `turn.completed` event carries that turn's `input_tokens`, `cached_input_tokens`, `output_tokens` and `reasoning_output_tokens` ([OpenAI](https://learn.chatgpt.com/docs/non-interactive-mode)):

```bash
codex exec --json -m gpt-6.2-sol "Summarize the repo structure" \
  | jq -c 'select(.type == "turn.completed") | .usage'
```

For interactive sessions, Codex's OpenTelemetry export is off by default and turns on with an `[otel]` block in `config.toml`. Every event and metric carries the `model`, and the `turn.token_usage` metric records each turn's tokens by type ([OpenAI](https://learn.chatgpt.com/docs/config-file/config-advanced)). None of these report a cost, so the price is up to you.

## How do you work out what a Codex turn cost?

Multiply each kind of token by its credit rate. OpenAI publishes Codex rates in credits per million tokens, at Standard speed, as of November 2026 ([OpenAI](https://learn.chatgpt.com/docs/pricing)):

| Model         | Input | Cached input | Output |
| ------------- | ----- | ------------ | ------ |
| GPT-6.2 Astra | 200   | 10           | 1,000  |
| GPT-6.2 Sol   | 50    | 2.5          | 250    |
| GPT-6.1 Terra | 25    | 1.25         | 125    |
| GPT-6 Luna    | 2.5   | 0.25         | 12.5   |

Take the sample turn in OpenAI's `codex exec` documentation: 24,763 input tokens, 24,448 of them from cache, and 122 output tokens. On GPT-6.2 Sol, which OpenAI recommends for everyday coding, the 315 uncached input tokens cost 0.016 credits, the cached ones 0.061 and the output 0.031, about 0.11 credits in all. On GPT-6 Luna the same turn costs about 0.0084 credits, roughly a thirteenth.

![The same Codex task costs 13× less on Luna. GPT-6.2 Sol, 0.11 credits; GPT-6 Luna, 0.0084 credits. Area shows credits for one task. Source: OpenAI's sample codex exec task (24,763 input tokens, 24,448 cached, 122 output) at Codex credit rates, November 28, 2026.](https://autorouter.com/blog/images/see-what-each-turn-costs/2-sol-vs-luna.png)

The gap is smaller than Luna's twentyfold lower input and output rates suggest, because cached input is only ten times cheaper on Luna and this turn is almost all cache. Long sessions look like this: most of each turn's input is the conversation so far. On a ChatGPT plan, credits measure usage against included limits; OpenAI notes that credit prices alone don't set how much a plan includes. [Codex usage limits explained](/blog/codex-usage-limits) covers what a plan holds.

## Which tool shows the model and cost of each turn?

The event-level tools and AutoRouter do; the in-app commands report the session or the account. As of November 2026:

| Tool                                        | Model               | Cost                   | Per turn            |
| ------------------------------------------- | ------------------- | ---------------------- | ------------------- |
| Claude Code `/usage`                        | Tokens by model     | Session estimate       | No                  |
| Claude Code status line                     | Current model       | Session estimate       | No                  |
| `claude -p --output-format json`            | By model            | Estimate               | Yes, one run        |
| Claude Code OpenTelemetry                   | Each request        | Estimate per request   | Yes, by `prompt.id` |
| Codex `/status`, `/statusline` and `/usage` | Current model       | None                   | No                  |
| `codex exec --json`                         | From `-m` or config | None; price the tokens | Yes                 |
| Codex OpenTelemetry                         | Each event          | None; price the tokens | Yes, tokens         |
| AutoRouter                                  | Each turn           | Each turn              | Yes                 |

For teams, Anthropic's spend report in org analytics shows estimated spend per user and per model, updated daily, and OpenAI's usage insights in the Admin Console show messages and credits by use case and task. Both group spend over a period, and neither breaks it down by turn. [How to cut Claude Code and Codex costs](/blog/cut-claude-code-and-codex-costs) covers what to do once you know where the usage goes.

## How does AutoRouter show the model and cost of each turn?

AutoRouter shows each turn's model, what it cost and why, while AutoRouter is the model selected in your coding agent's own model picker. It picks that model itself: your own rules decide a turn first, and otherwise it works out how hard the turn is and only considers models that clear the quality bar for it. [How AutoRouter picks a model](/blog/how-autorouter-picks-a-model) walks through the steps.

Because the reason sits next to the model and the cost, an expensive turn explains itself. You can see which models do best on which tasks and then write a rule or pick a model yourself, and if a pick falls short, you can rate it. The AutoRouter team reviews real routing decisions and every rating people send. AutoRouter keeps records of the model chosen, tokens and cost, plus the message that opens each turn, up to 4,000 characters, to review routing; it doesn't store transcripts ([privacy](https://autorouter.com/privacy)). It works with every coding agent you use (Claude Code, Codex, Cursor, etc.), is in beta, runs on macOS 14 or later, and routing across the AI subscriptions you already pay for is free.

## Questions

### Does Claude Code's cost estimate match my bill?

Not exactly. Claude Code computes the figure locally at list price unless your organization sets a `modelPricing` table, so for billing Anthropic points API users to the Cost page in the Claude Console. On Pro, Max and Ultra, turns draw on plan limits, which the `/usage` bars show.

### Does Codex show what a turn cost in dollars?

No. Codex reports tokens, and OpenAI publishes credit rates per million tokens for each model. What a credit costs depends on your plan or agreement.

### Why doesn't the token count on Claude Code's spinner match /usage?

The spinner counts the output of the current turn only, and resets each turn. The `Usage by model` line in `/usage` adds up the whole session.

### Can I find out which model handled a turn in an old session?

Only if you exported telemetry at the time. Claude Code keeps session transcripts under `~/.claude/projects/` and deletes them after `cleanupPeriodDays`, 30 days by default, and Anthropic documents per-request models and costs in the telemetry events, so export telemetry if you want that record.

## Sources

- [Monitoring usage](https://code.claude.com/docs/en/monitoring-usage), Claude Code docs, Anthropic, checked November 28, 2026
- [Manage costs effectively](https://code.claude.com/docs/en/costs), Claude Code docs, Anthropic, checked November 28, 2026
- [Model configuration](https://code.claude.com/docs/en/model-config), Claude Code docs, Anthropic, checked November 28, 2026
- [Customize your status line](https://code.claude.com/docs/en/statusline), Claude Code docs, Anthropic, checked November 28, 2026
- [Run Claude Code programmatically](https://code.claude.com/docs/en/headless), Claude Code docs, Anthropic, checked November 28, 2026
- [Explore the .claude directory](https://code.claude.com/docs/en/claude-directory), Claude Code docs, Anthropic, checked November 28, 2026
- [Slash commands](https://learn.chatgpt.com/docs/developer-commands), Codex docs, OpenAI, checked November 28, 2026
- [Non-interactive mode](https://learn.chatgpt.com/docs/non-interactive-mode), Codex docs, OpenAI, checked November 28, 2026
- [Advanced configuration](https://learn.chatgpt.com/docs/config-file/config-advanced), Codex docs, OpenAI, checked November 28, 2026
- [Codex pricing](https://learn.chatgpt.com/docs/pricing), OpenAI, checked November 28, 2026
- [Usage insights](https://learn.chatgpt.com/docs/enterprise/usage-insights), Codex docs, OpenAI, checked November 28, 2026

## Read next

- [When do Claude Code, Codex and Cursor usage limits reset?](https://autorouter.com/blog/ai-coding-usage-limits.md): When a coding agent hits its usage limit, AutoRouter, the Mac app for all your coding agents, moves on to the connected plan with the most room left, and AutoRouter Pro keeps you working from its included usage until the plan resets. As of November 19, 2026, Claude's five-hour session resets five hours after your first message and its weekly limit at a fixed weekly time, Codex resets on a five-hour window shown in its usage dashboard, and Cursor refills a weekly pool on current plans and a monthly one on legacy plans.
- [What is the Claude session limit, and when does it reset?](https://autorouter.com/blog/claude-session-limit.md): The Claude session limit is the five-hour usage limit on Claude's Pro and Max plans: it starts when you send your first message and resets in full five hours later, as of November 16, 2026. claude.ai, Claude Desktop and Claude Code all count toward it, Anthropic publishes no message count for it, and verified Ultra accounts don't have one. AutoRouter, the Mac app for all your coding agents, makes it last longer by sending quick work to lower-cost models.
- [Claude 5-hour limit vs weekly limit: what resets when](https://autorouter.com/blog/claude-5-hour-limit-vs-weekly-limit.md): Claude's 5-hour limit starts with your first message and resets in full five hours later, while the weekly limit resets at a fixed day and time Anthropic assigns to your account, as of November 16, 2026. Every request counts against both at once, so whichever runs out first stops you. Pro and Max have both limits, and verified Ultra accounts have only the weekly one.

Tags: [Costs](https://autorouter.com/blog/tags/costs.md), [Guides](https://autorouter.com/blog/tags/guides.md), [Claude Code](https://autorouter.com/blog/tags/claude-code.md)

Drafted with AI from the sources linked above, then checked and edited by the AutoRouter team.

AutoRouter is a Mac app for AI model routing in Codex, Claude Code, Cursor and other supported coding agents. It uses eligible connected subscriptions first. See [setup](https://autorouter.com/setup.md) and [pricing](https://autorouter.com/pricing).
