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.
| Series | A spike means | First fix |
|---|---|---|
| Input | Large context or many files | Pass ranges, not whole files |
| Cached input | A stable prefix is being reused well | Nothing, this is the cheap part |
| Output | Long explanations or generated files | Ask for diffs and short answers |
| Sessions | More agent runs | Batch 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
| Pattern | Likely cause | What to change |
|---|---|---|
| Steady climb, no spikes | Growing context per session | Start fresh sessions per task |
| Sharp spikes, fast recovery | Agent runs and retries | Add a stop condition |
| Step change after a date | Plan or model change | Compare the same model class |
| Flat line at zero | Sessions not being read | Check 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.