Where did my Claude Code and Codex spend go? The costliest turns and cache rebuilds
To see where Claude Code and Codex spend went, look at which responses cost the most, which ones rebuilt Claude Code’s prompt cache, and what filled the context. Open the Overview from the chart icon on ACTVT’s home and pick a range. “Where it went” prices Claude Code’s cache rebuilds: responses that wrote most of the conversation into the prompt cache again instead of reading it. It counts them, says why each happened (the start of the context changed, or a pause longer than the cache lasts) and what helps. It lists the range’s costliest responses across Claude Code, Codex and pi, each opening its session. Below, by size only, it shows what filled the context: MCP servers by what they returned, Skills, and files read again and again. Costs are at API rates from ACTVT’s pricing table, not your bill; the context rows have no dollar figure because the API bills per response, not per tool. Show me › opens the session behind the rebuilds.
0:425 chapters
Step by step
0:00Open the Overview
On a test Mac with staged agent runs. The Overview opens from the chart icon on ACTVT’s home: what every agent on this Mac spent in the last 7 days, at API rates.
0:10Why the cache rebuilt
Further down, “Where it went”: Claude Code’s cache rebuilds cost $0.79 extra at API rates. Twice because the start of the context changed, once after a pause longer than the cache lasts. What helps, for each reason: keep the start of each turn the same, and start fresh after a long break.
0:23The costliest turns
The week’s costliest turns across Claude Code, Codex and pi, at API rates. Both are Claude Code’s, and both rebuilt the cache.
0:29What filled the context
What filled the context, by size only: the API bills per response, not per tool.
0:33Open the session
Show me › opens the Claude Code session behind them: one audit, then one question after an hour away, $0.91 at API rates.
Questions
- Is this my bill?
- No. Costs are at API rates, from ACTVT’s pricing table. On a subscription your plan meters usage differently.
- Why does the cache rebuild after a break?
- The prompt cache expires after a period without requests: an hour for Claude Code’s main conversation on a subscription within plan usage, 5 minutes otherwise. The next turn writes the conversation back into the cache.
More tutorials
All tutorials →
1:24Every machine you code on
See Claude Code, Codex and pi sessions from all your machines over SSH
Start Claude Code on another Mac over SSH, and you can follow the session from your own Mac while it runs and read the whole transcript when it’s done.
3:42Leftover ports
Find and kill the dev server Claude Code or Codex left running
Claude Code starts a dev server and then quits, and port 3000 stays taken. ACTVT shows you the server whose session is gone and lets you free the port safely.
0:48A plan-aware agent
Check your Claude and Codex plan limits before a long agent job
Before a two-hour job, Claude Code asks ACTVT how much of your plan is left. You can see the same limits in ACTVT, along with when each one resets.
Try it on your own agents
ACTVT is free to start, and reads the session files Claude Code, Codex CLI and Pi already write. Nothing to configure.