Skip to main content

TIL about tracking your Codex tokens usage

Published:

1 min read

I use Codex for both code-related and non-code tasks in Cursor and in the terminal. I wanted a better way to track Codex token usage day by day.

Recently, I learned about @ccusage/codex, which reads your local Codex logs and spits out a table of exactly how many tokens you used each day. This breakdown isn’t provided by the Codex usage page.

npx @ccusage/codex@latest

If you’re using Codex CLI and haven’t run this yet, do it. You might be very surprised. I certainly was when I looked at my usage.

Here is a snapshot from Feb 06 to Feb 08, 2026. The Total row is my cumulative usage since September 2025, not only these three days:

DateModelInputOutputReasoningCache ReadTotal TokensCost (USD)
Feb 06, 2026gpt-5.2-codex396.8K26.4K20.8K1.0M1.4M$0.89
Feb 07, 2026gpt-5.2-codex1.1M208.5K91.1K18.2M19.5M$5.79
Feb 08, 2026gpt-5.3-codex83.0K16.3K10.5K498.6K597.9K$0.33
Total146.9M22.6M15.3M2.3B2.5B$794.76

It reads your local logs and gives you a breakdown of your Codex token usage, including input, output, reasoning, cache reads, total tokens, and even the cost in USD based on current pricing. The tool pulls live pricing from LiteLLM, so the cost calculations should stay accurate even when OpenAI changes rates again.

Support me

Next Post
Migrating from Cursor to VS Code

Aman Mittal author

I'm a software developer and technical writer. On this blog, I share my learnings about both fields. Recently, I have begun exploring other topics, so don't be surprised if you find something new here.

Currently, working on documentation at Expo.

Tech writing blog webring | Static.Quest webring