viberank
Back to Blog

How to Check Your Codex Usage: Limits, Tokens & Costs

July 24, 20266 min read

The short answer, as of Codex CLI v0.140.0: type /usage inside a session for your token activity — lifetime total, peak day, streak, and a daily heatmap — or /status for how much of your 5-hour and weekly rate limits you've burned. For costs in dollars, and for history that survives across machines, run npx ccusage@latest daily. This guide covers all three — plus what the numbers mean and how to stack yours against the 190+ developers on the public Codex leaderboard.

Checking your tokens: /usage

Codex CLI v0.140.0 added a /usage command, and it's now the fastest answer to “how many tokens have I burned”. Launch the TUI with codex, type /usage in the composer, and press Enter. You get four headline numbers — lifetime tokens, your peak day, your current streak with its best record, and your longest single task — above a GitHub-style contribution heatmap.

/usage daily# 7×52 heatmap, contribution-graph style
/usage weekly# weekly bar chart
/usage cumulative# cumulative bars

What /usage still doesn't give you is money. It counts tokens, not API-equivalent dollars, and it only knows the machine it's running on. For cost, and for a combined view across every agent you use, you still want ccusage below.

Checking your limits: /status

Inside any Codex CLI session, type /status. It shows your current position against both rate-limit windows — the rolling 5-hour session and the weekly cap — as live percentages. (You need to send at least one message in the session first, or there's no rate-limit state to report.) What it doesn't show: reset timestamps or banked credits — those live on your ChatGPT account's web usage page. And it says nothing about dollars, which is what ccusage is for. For token counts, use /usage above.

Checking tokens and costs: ccusage

Codex CLI writes each session as JSONL under ~/.codex (or wherever CODEX_HOME points). ccusage parses those files, diffs the per-turn token counters, and rolls everything up into daily and monthly reports with API-equivalent costs:

npx ccusage@latest daily# per-day tokens + cost, all agents
npx ccusage@latest monthly# monthly rollup

The same command covers Claude Code, Gemini CLI, Copilot CLI and OpenCode, so if you bounce between agents you get one combined view instead of four dashboards. For a deeper comparison of how the big three stack up on cost, see Codex vs Claude Code vs Gemini CLI.

What the numbers mean (and why they look huge)

Agentic coding resends context on every turn — system prompt, file contents, tool output — so daily token counts in the tens or hundreds of millions are normal for heavy users. The saving grace is prompt caching: across all usage tracked on Viberank, roughly 95% of tokens are cache reads billed at a fraction of the input price. That's also why ccusage reports API-equivalent cost: if you're on a ChatGPT plan your marginal cost is $0, and the number tells you what your plan is actually worth — many heavy Codex users clear their subscription price in value within days.

The Codex leaderboard

196 developers currently track Codex usage on Viberank, alongside 990+ on Claude Code and 76 on Gemini CLI. The Codex board filters the global leaderboard to submissions that include Codex, ranked by API-equivalent spend and tokens; every profile breaks usage down per model and per tool, with an activity heatmap and streaks. If you're into tokenmaxxing, this is the scoreboard.

Join in one command

npx viberank-cli

It runs ccusage locally, submits only the usage totals (never your code or prompts), and links the submission to your GitHub handle — sign in on the site for a verified badge. Spending too much? Start with 9 ways to cut your AI coding bill.

Codex usage FAQ

How do I check my OpenAI Codex token usage?

Three ways. Type /usage inside a Codex CLI session (v0.140.0 and later) for lifetime tokens, peak day, streak and a daily activity heatmap. Type /status for how much of your 5-hour and weekly rate limits you've used. Or run npx ccusage@latest daily to parse Codex's local session logs (JSONL under ~/.codex) into per-day token counts and API-equivalent dollar costs across every agent you use.

How do I check how many tokens I have left in Codex?

Both views exist now. /usage reports your actual token totals — lifetime, peak day, streak — while /status reports how much of the 5-hour session window and weekly cap you have consumed, as percentages. Reset timestamps and banked usage credits still live on your ChatGPT account's web usage page rather than in the CLI.

Where do I check my Codex credits?

On your ChatGPT/OpenAI account's usage page in the browser. In the CLI, /status shows rate-limit percentages and /usage shows token activity; credit balances and window reset times remain web-only.

Does Codex usage tracked this way match my OpenAI bill?

Not exactly. ccusage computes API-equivalent cost from model list prices. If you use Codex through a ChatGPT plan, you don't pay per token — the number tells you what your usage would cost at API prices, which is the fairest way to compare across tools and plans.

Is there a public leaderboard for Codex usage?

Yes — Viberank ranks developers by real usage across Codex, Claude Code, Gemini CLI and more, with a Codex-only view at viberank.app/tool/codex. Run npx viberank-cli to join.

Why does Codex burn tokens so fast?

Agentic sessions resend context every turn: system prompt, file contents, tool results. Most of that is prompt-cache reads billed at a fraction of input price, so a big token number is usually a much smaller bill.