Codex token usage, read from your own sessions
Codex keeps a rollout file for every session. The AgentsTrack collector reads them on your machine and prices every token type, so usage per project, model and day comes with the basis of each figure.
Where the numbers come from
- Rollouts under
~/.codex/sessions/, one file per session by date, read and never written.CODEX_HOMEis honoured. - The model comes from each turn, and tool calls from the same rollout.
- Nothing hooks into Codex. The collector is a separate process reading files that already exist.
What is counted
- Input, cached input and output tokens, each priced at its own rate.
- Reasoning tokens are shown, but they are part of output, so they are never billed twice.
- A model with no rate entry reports zero rather than a guess.
Subscription or API cost
- Codex records the account's plan with its rate limits, and the collector also reads it from
~/.codex/auth.json. A ChatGPT subscriber sees SUBSCRIPTION: what the work would cost at API list rates, never an invoiced amount. - Without a plan, for example with an API key, the figure is ESTIMATED at published list rates.
- See cost basis for what each label promises.
What leaves your machine
- Redaction runs on your machine before anything is queued for upload.
- In
metadatamode only counts, timings and identifiers travel: no prompt, no titles derived from prompts, and a shell command is reduced to its binary name. - The default
analyticsmode adds summaries derived on your machine. The prompt itself never travels unless you choosefull. - Your organization's setting is a ceiling, never a floor: it can narrow what you send, never widen it.
Read on
See what your Codex sessions cost
14 days of Pro, no card. Two commands, and your first session lands in the dashboard.