AI plans

ccusage: Track Claude Code and Codex Token Cost

ccusage is a free open-source CLI that shows what your Claude Code and Codex sessions cost at API rates. It ranks sessions so you can find the expensive ones.

4 min · 2026-09-07 · Watch on YouTube

The main idea

If you use a coding agent such as Claude Code or Codex, ccusage shows where your tokens go. It is free and open source, and one command installs it.

Running ccusage claude daily lists my cost at API rates for each day. The total looks like thousands of dollars, but I pay for a $200 plan. The session command is the more useful one. I saved the output to sessions.txt, and the list starts with the most expensive session. My top session cost about $824, and I used Fable 5 and Sonnet 5 models in it. It ran over a couple of days.

Long sessions get expensive because of the cache. If you take a break longer than 1 hour, the cache expires. The whole context is sent again, and you pay to read it and write it to the cache. My fix is to save progress in a handover document and continue in a new session. Plain ccusage reads Claude, Codex, Gemini, Hermes, Open Claw, Open Code, Pi Agent and Qwen sessions.

Key points

Chapters

  1. 0:12Install and daily cost
  2. 1:16Most expensive sessions
  3. 2:16Why long sessions cost more
  4. 3:26Supported agents
Free live lesson · Nov 24Stop Measuring AI by Tokens. Measure What It EarnsOne hour, live, with Saurav. Bring your own bill. Free.
Save my free seat →
Get new videos and tips by emailOne short email when there is something new. Unsubscribe any time.

More CloudYeti videos