Codex

Codex usage graph: see your token trend

A Codex usage graph turns daily session files into a token trend. Learn what to plot, how to read spikes, and which patterns predict a limit hit.

Quick answer

Plot Codex tokens per day, split into input, cached input, and output. A useful graph also marks the days a limit was hit. UsageAtlas builds this from local session files and keeps 7, 30, or 90 days of history, so you can see whether a spike is a one-off task or a new baseline.

What to put on the axes

One line for total tokens is a start, but it hides the cause. Three series answer the practical questions: input tells you about context size, cached input tells you about prompt reuse, and output tells you about how much the model writes.

SeriesA spike meansFirst fix
InputLarge context or many filesPass ranges, not whole files
Cached inputA stable prefix is being reused wellNothing, this is the cheap part
OutputLong explanations or generated filesAsk for diffs and short answers
SessionsMore agent runsBatch tasks instead of one per prompt

Three shapes worth recognising

  • A single tall bar: one expensive refactor. No habit change needed unless it repeats.
  • A rising staircase: context growing across a long session. Start new sessions per task.
  • A flat line with periodic gaps: you hit a limit and stopped. Check which window.
  • A new higher baseline after a model switch: compare tokens per request before blaming the model.

Build the graph without a spreadsheet

Codex writes one JSONL file per session. A script can total tokens per day, but most people want the answer without maintaining a parser. UsageAtlas reads the folder and renders the chart with the limit markers already attached.

If you prefer raw data, the Codex usage history guide explains which fields to sum.

Reading a usage graph without fooling yourself

PatternLikely causeWhat to change
Steady climb, no spikesGrowing context per sessionStart fresh sessions per task
Sharp spikes, fast recoveryAgent runs and retriesAdd a stop condition
Step change after a datePlan or model changeCompare the same model class
Flat line at zeroSessions not being readCheck the data folder

A graph with no axis labels is decoration. You want tokens per day, the model used, and the period shown on the same view, which is what the Codex usage dashboard provides locally.

Questions, answered

Does Codex have a built-in usage graph?

The CLI shows current session usage and limit percentages. It does not chart tokens over days, so a local tracker or a script over the session files is needed.

How many days of Codex history should I keep?

Thirty days is enough to spot a habit; ninety days is enough to compare plans across a billing cycle. UsageAtlas supports 7, 30, and 90-day ranges.

Why does the graph show zero for a day I used Codex?

The session file may not have been written yet, or the session ran under a different CODEX_HOME. Check both before assuming the data is lost.

Browse by topic