How to see tokens per second in Claude Code and Codex
Neither Claude Code nor Codex shows its speed, but both log what you need to work it out: the output tokens of each reply and when it started and finished. How the speed is measured, what 30 days of our own sessions ran at, why short replies look slow, and 3 ways to see tokens per second while you work.
Tecyfy · Published · 6 min read

Neither Claude Code nor Codex shows tokens per second. Both write what you need to work it out to files on your own machine: how many tokens each reply generated, and when it started and finished. Divide one by the other and you have the speed, and a small tool can do that live in your status line or editor.
The number is worth having. It tells you whether a slow afternoon is the model, your long context or a reply that spent most of its time thinking.
Does Claude Code or Codex show tokens per second?
No. Both have a status line, and neither can show a speed today.
Claude Code's status line can run any script, and it hands that script the model, the session's cost and duration, how full the context window is and your rate limits. It has no speed field. The nearest is cost.total_api_duration_ms, the time spent waiting on the API across the whole session, with no session total of output tokens to divide it by.
Codex has a footer status line too, set by tui.status_line in ~/.codex/config.toml. Its items are a fixed list built into Codex: the model, directory, git branch, context used, the 5-hour and weekly limits, token totals and a few more. None is a speed, and the footer cannot run a command of your own.
How is tokens per second measured?
Tokens per secondThroughputHow much work a model system gets through in a given time, counted in requests or tokens per minute; on an API it is capped by rate limits, on your own hardware by batching and memory. here means output tokens divided by the time from the request being sent to the reply arriving. Claude Code logs both ends: a line when each request goes out, and the reply with its token counts. Codex logs each response's usage when it finishes, so the clock starts at the input that triggered it, your message or a tool result.
Measured this way it is an end-to-end figure. It includes the wait before the first token, while the model reads the whole context, as well as the writing itself. That makes it a little lower than the model's raw generation speed, and closer to what you sit through. Inference latency explains the 2 phases.
2 things in the count surprise people:
- Thinking is output. Claude reports thinking tokens as part of its billed output tokens, and OpenAI bills reasoning tokens as output too. A reply that thinks for 1,500 tokens and then writes 3 lines generated 1,500-odd tokens quickly. You just saw very little of it.
- One task is many replies. An agent calls the model again after every tool result, so the speed updates many times within one of your prompts.
How fast are Claude Code and Codex?
In our own sessions, Claude Opus 5.5 in Claude Code ran at a median of 85 tokens per second, Claude Sonnet 5.5 at 109 and GPT-6.1 Sol in Codex at 26. We measured 30 days of our Claude Code and Codex work, 3 October to 2 November 2026, and every Claude Code reply in that month ran at standard speed, none in fast mode.
| Model | Tool | Timed replies | Median speed | Replies under 100 tokens | Replies of 1,000+ tokens |
|---|---|---|---|---|---|
| Claude Opus 5.5 | Claude Code | 69,004 | 85 tok/s | 41 tok/s | 105 tok/s |
| Claude Sonnet 5.5 | Claude Code | 1,044 | 109 tok/s | too few | 129 tok/s |
| GPT-6.1 Sol | Codex | 3,565 | 26 tok/s | 15 tok/s | 31 tok/s |
| GPT-6 Luna | Codex | 320 | 64 tok/s | 40 tok/s | 116 tok/s |
The columns on the right are the useful part. On Opus 5.5, a long reply ran at 105 tokens a second and a short one at 41. The model did not slow down for short replies; the fixed wait before the first token is spread over fewer tokens. A median Opus reply in our month was only 417 tokens, so most replies sit nearer the slow end than the long-reply figure suggests.
Short replies look 2.5 times slower than long ones. The model is not slower: the wait before the first token is shared by fewer tokens.
Medians over 30 days of our Claude Code and Codex sessions (3 Oct to 2 Nov 2026), measured from the session logs: output tokens over the time from request sent to reply logged, so the wait before the first token is included. Standard speed throughout; no fast mode.
These are one team's sessions on one connection, and the Codex figures are timed from a slightly different starting point. Treat them as a sense of scale, and measure your own.
Why is Claude Code slow?
When Claude Code feels slow, the speed usually tells you why, and in our sessions the cause was not the one we guessed.
It is probably not your long context. We expected speed to fall as sessions grew, and it barely moved. For Opus 5.5 replies of 100 to 999 tokens, the median was 82 tokens a second at 50,000 to 150,000 tokens of context, 81 at 150,000 to 300,000, and 85 above 300,000. A long session costs you usage on every reply, as why Claude Code eats your limit shows, but in our month it did not cost much speed.
A normal rate with little on screen means thinking. Opus 5.5 starts at medium effort in Claude Code. /effort low means less thinking and faster replies, possibly at some cost in quality on hard tasks; /effort with no level opens a slider.
A low rate on every reply, long or short, is the model's own pace. On Opus, fast mode is the documented answer: up to 2.5 times faster, at $8 and $40 per million input and output tokens, twice the standard price. Turn it on with /fast. On a Claude plan it is paid from usage credits, not your included usage. Models in Claude Code covers switching models and effort.
How to show tokens per second while you work
You can see the speed in 3 ways: from Claude Code's own telemetry, live in your status line or status bar with a log reader, or by hand from the session files.
With Claude Code's own telemetry. Set CLAUDE_CODE_ENABLE_TELEMETRY=1 and point the logs exporter (OTEL_LOGS_EXPORTER=otlp) at an OpenTelemetry collector. Each api_request event carries output_tokens and duration_ms, so output tokens divided by seconds is the reply's speed. This suits a team that already runs a collector and wants speed beside cost on a dashboard. It covers Claude Code only.
In the status line or status bar, with LLM Vitals. We made LLM Vitals, a free, open-source tool that reads the session files both agents already keep and shows the speed of each reply as it lands. It needs no API key and sends nothing anywhere.
- In VS Code, Cursor or Antigravity, install the extension (
ext install hamperpick.llm-vitals-vscodein Quick Open). The status bar shows62 tok/safter each reply, or the seconds waited while a request runs. - In Claude Code's terminal, run
npx llm-vitals setuponce. The status line then reads like⚡ 62 tok/s · avg 55 tok/s · ctx 41%. It changes only thestatusLineentry of your settings, keeps a backup, and leaves an existing status line alone. - For Codex, whose footer takes only built-in items,
npx llm-vitalsopens a live table of every active session in a terminal, Claude Code's and Codex's side by side.
By hand, once. Claude Code keeps each session as a JSON Lines file under ~/.claude/projects/, and every reply line has output_tokens in its usage. Subtract the timestamp of the request line from the reply's and divide. Doing it once shows you what the number means; for every reply, let a script do it.
Whichever you pick, watch the speed for a day of normal work before changing anything. The pattern across replies, long waits, long thinking or a slow model, tells you which of the fixes above is worth its cost. The Claude Code cost guide covers the other side of that trade.
Questions
- Does Claude Code show tokens per second?
- No. The data Claude Code passes to a status line has the model, cost, session duration, context window use and rate limits, but no speed. Its session logs do record each reply's output tokens and when the request was sent, so a tool that reads them, or Claude Code's OpenTelemetry events, can work the speed out.
- Can Codex show tokens per second in its status line?
- Not today. The items Codex's footer can show are a fixed list built into Codex: model, directory, git branch, context used, rate limits, token totals and a few more. None of them is a speed, and the footer cannot run your own command. A separate tool that reads Codex's session logs can show it in a terminal or your editor's status bar.
- How fast is Claude Opus 5.5 in Claude Code?
- Over 69,004 timed replies in our own sessions from 3 October to 2 November 2026, at standard speed, the median was 85 tokens per second, measured from the request being sent to the reply being logged. Replies of 1,000 tokens or more ran at a median of 105, and replies under 100 tokens at 41, because the wait before the first token weighs more on a short reply.
- Why does Claude Code feel slow when tokens per second looks normal?
- Because the speed counts tokens you do not see. Thinking tokens are billed as output tokens, so a reply that thinks for 1,500 tokens and writes 3 lines generated quickly but shows you little. In our own sessions, context size made little difference to speed. Lower effort (/effort) means less thinking and faster replies, and fast mode (/fast) makes Opus up to 2.5 times faster at twice the price.
- Do I need an API key to measure Claude Code's speed?
- No. Claude Code and Codex already write each reply's token counts and times to session files on your own machine, on a plan or with an API key. Reading those files needs no key and sends nothing. Claude Code's OpenTelemetry route needs no key either, but you have to run somewhere to receive the events.
Sources