What is your Codex usage actually worth?
Codex CLI records every token it uses in local logs, but a ChatGPT subscription never shows you what that usage would cost at API prices. One command reads those logs and puts a dollar figure on each day and model.
One command
npx mytokentracker
You get the last 30 days by day, agent and model, priced at API list rates. Codex rows sit next to Claude Code, Copilot CLI or anything else you use, so you can see which agent your money actually goes to. Add --days 90 for a longer window, if the logs go back that far.
Where the numbers come from
- The logs. Codex writes session logs as JSONL files under
CODEX_HOME, which defaults to~/.codex. Bothsessions/andarchived_sessions/are read. - The parser. MyTokenTracker uses the open source ccusage Codex data source, which counts token deltas per request and groups them by the model active at the time.
- The prices. API list rates from LiteLLM's pricing data. Cached input uses the cache-read price, and reasoning tokens are charged as output, not separately. Fast mode is priced at the documented multiplier where one exists.
Codex support in ccusage is marked experimental because the Codex log format is still changing. Treat the figure as a close estimate, not an invoice.
Models you are likely to see
Current API prices for the models Codex commonly runs. Each page has the per-token rates, cache pricing and a workload calculator.
Keep the history
A local report can only see what is still on disk. Run npx mytokentracker init to connect a free account: the CLI then syncs daily totals per agent and model every 30 minutes on macOS and Linux, and the dashboard keeps them, across machines, for as long as you want. Prompts, responses, code and file paths are never uploaded.
Frequently asked questions
How do I see what Codex costs me?
Run npx mytokentracker in a terminal on the machine where you use Codex CLI. It reads Codex's local session logs, prices each model at API list rates, and prints the last 30 days by day, agent and model. No account is needed and nothing is uploaded.
Where does Codex CLI keep its usage logs?
Codex writes session logs as JSONL files under CODEX_HOME, which defaults to ~/.codex. The parser reads both the sessions and archived_sessions folders. You can point CODEX_HOME at several directories separated by commas.
How accurate is the Codex cost?
It is an API-equivalent estimate from the token counts Codex records, priced with LiteLLM's pricing data. Reasoning tokens count as output. Codex log support in the underlying parser is marked experimental because the log format keeps changing, and a few cases are approximated, such as the auto-review routing alias and very early logs that never recorded a model.
I pay for ChatGPT. Can I compare that with my Codex usage?
Yes, in the terminal. Run npx mytokentracker --plan with your monthly price in dollars and the CLI shows the multiple. The dashboard's monthly plan-value receipt currently knows Anthropic plans only, so there Codex usage is listed separately rather than compared with a ChatGPT plan.
Does it work with Claude Code and Codex together?
Yes. One report covers every agent the parser finds on the machine, so Claude Code, Codex, GitHub Copilot CLI, Antigravity, OpenCode and others appear side by side.