How to Check Codex CLI Usage and Token Cost
Codex CLI's /status command only shows the current 5-hour window. Here is how to see your full token history and what it actually costs.
Quick answer
npx whoburnedmorein your terminal. It reads Codex CLI's local logs — which the tool writes to disk every session — and gives you a complete token history and estimated cost. The built-in/status command only shows the current 5-hour or weekly window; whoburnedmore shows everything. 💸OpenAI's Codex CLI — the terminal agent that can write, run, and fix code autonomously — ships with a usage view called /status. It is useful in the moment: you can see at a glance whether you are close to the 5-hour or weekly cap on your ChatGPT Plus or Pro plan. But the window resets and the history vanishes. If you want to know how much you burned last week, which model ate the most tokens, or what the equivalent API cost would be, /status cannot help you — but the logs can.
What does the built-in /status command show?
Inside a running Codex CLI session, type /status and you get a snapshot of your current window consumption:
/status Usage (5-hour window) ──────────────────────────────── Requests used: 38 / 50 Resets in: 2h 14m Usage (weekly window) ──────────────────────────────── Requests used: 312 / 750 Resets on: Mon 00:00 UTC
Notice what is absent: there are no token counts, no cost estimate, and no breakdown by model. The numbers are in “requests,” which maps to OpenAI's premium request unit rather than raw tokens. For a ChatGPT plan subscriber this is the relevant ceiling — but it tells you nothing about actual spend if you also use the API directly, and it gives you no historical data to work with.
The 5-hour window is stricter than it looks
The 5-hour cap resets on a rolling basis from your first request in the window, not from midnight. Heavy use early in the day can leave you locked out for hours mid-afternoon. Tracking your consumption across windows — which whoburnedmore does — reveals these patterns so you can pace your usage more evenly.How do I see my full Codex usage history?
Run npx whoburnedmore from any directory. It scans the local Codex CLI log path, parses all session records, and outputs a complete history:
$ npx whoburnedmore↳ scanning ~/.codex/sessions/…↳ found 1,243 entries across 89 sessions CODEX CLI USAGE — last 30 days ────────────────────────────────────────── Week of Jun 09 input 3,812,400 output 294,600 Week of Jun 02 input 5,124,700 output 401,200 Week of May 26 input 2,987,100 output 218,900 MODEL SPLIT gpt-4o 7.2M tokens (62%) o3 3.1M tokens (27%) o4-mini 1.3M tokens (11%) 30-day total: 11.6M tokens est. $29.40
The model split is particularly useful. Codex CLI can route requests to different models depending on the task type — reasoning-heavy tasks often escalate to o3, which costs significantly more per token than gpt-4o. Seeing the split lets you make an informed choice about whether to pin to a cheaper model for routine tasks.
- gpt-4o (62%)62%
- o3 (27%)27%
- o4-mini (11%)11%
Where does Codex CLI store its logs?
Codex CLI writes session records to ~/.codex/sessions/ by default. Each file is a JSON array of turns, each with a model identifier and token counts for that exchange. whoburnedmore reads these automatically — no configuration required. If you installed Codex CLI with a custom --config-dir, pass --codex-dir /path/to/dir to point whoburnedmore at the right location.
How is Codex CLI cost estimated?
On a ChatGPT plan, Codex usage is metered in premium requests, not dollars. But the underlying models have public per-token prices. whoburnedmore applies those prices to give you an API-equivalent cost — useful both for comparing value and for forecasting what a switch to direct API access would cost:
For example, at mid-2026 API rates: gpt-4o costs roughly $2.50 per million input tokens and $10 per million output tokens; o3 is priced substantially higher at around $10 input and $40 output per million. A week where 40% of your tokens came from o3 turns would be dramatically more expensive at API rates than a week that used only gpt-4o.
Plan subscribers vs direct API users
| Scenario | Metering | History | Model granularity | Cross-tool |
|---|---|---|---|---|
| ChatGPT Plus / Pro | premium requests | — | — | — |
| API key (pay-per-token) | dollars billed | via dashboard | — | |
| whoburnedmore (both) | tokens + est. cost | full history | all agents |
How do I track my usage across multiple 5-hour windows?
The 5-hour window is opaque when you are in it — you know where you are now, not where you were four hours ago. whoburnedmore stores all parsed session data in a local cache (~/.whoburnedmore/cache.json), so after the first scan every subsequent run is instant and covers your entire history. 📊
- 1
First run — full scan
npx whoburnedmorereads every session file in~/.codex/sessions/. On a machine with 6 months of history this takes 3–5 seconds. - 2
Subsequent runs — incremental
whoburnedmore hashes each session file. Only new or modified files are re-parsed. Typical latency drops to under a second. - 3
Cross-window patterns
With daily data you can see if Monday mornings consistently burn through the 5-hour cap by 10 AM — a pattern that tells you to front-load lighter tasks or spread heavy work through the week.
Check your Codex limits guide too
For a deep dive on the 5-hour and weekly caps — what counts against them, when they reset, and how to avoid mid-session lockouts — see Codex usage limits: 5-hour and weekly caps.Is it safe to point whoburnedmore at my Codex logs?
Yes. whoburnedmore reads only the numeric and metadata fields from your session files: token counts, model names, and timestamps. The actual prompt text and code context that Codex CLI sends to the model is stored separately and is never read or transmitted. Run npx whoburnedmore --dry-run to see the exact JSON payload that would be sent to the leaderboard, or npx whoburnedmore --local to skip the submission entirely and keep the dashboard on your machine only. 🛡️
If you also use Claude Code, Gemini CLI, or Copilot, running npx whoburnedmore puts Codex next to all your other tools in the same table. That cross-tool view is the main reason developers reach for whoburnedmore over the single-tool alternatives — see the complete AI token usage guide for the full picture.
window Codex /status shows
days whoburnedmore covers
OpenAI models tracked
Related guides
How to Check Your AI Coding Token Usage
The cross-tool overview: one command that totals your token usage and cost across every AI coding agent you run.
How to Check Claude Code Token Usage
See your Claude Code tokens by day, model, and project — and how the built-in /usage compares.
Codex Usage Limits: 5-Hour and Weekly Caps
The 5-hour vs weekly windows on a ChatGPT plan — and how to track consumption.