The typo case
Pearl reads a long session from the last page first. The total: $7.30. The task: one typo.

What they say
- 1Pearl studies a cost chart through a magnifying glass: “Someone spent $7.30 fixing one typo.”
- 2She reads a long printout, a pile of pages beside her: “Always start at the last page.”
- 3On the desk, the report’s cover: “Fixing ‘recieve’”.
- 4Judy, with a sunburst guitar: “I wrote a song about it too.”
The typo was cheap. The conversation wasn't.
Claude Code's docs put it in one line: token costs scale with context size. Each new message is read along with the conversation before it. Ask for a one-word fix at the end of a long session, and Claude reads the whole session again to make it.
Prompt caching helps. Claude Code turns it on for you, so the part of the conversation it has already seen costs less to read again. Less is not nothing, and a long session still makes every small question a big one.
Keep small tasks small
/clearstarts fresh. Use it when you move on to work that has nothing to do with the last task, typos included./compactboils the conversation down to a summary, and you can tell it what to keep:/compact Focus on the auth changes./modelswitches models in the middle of a session, so a spelling fix need not go to the biggest model you have./contextdraws what fills the context as a colored grid, before you send the next message.
Start at the last page
Pearl reads the total first, then works back to find where it went. On an API key, /usage shows what the session has cost so far. For the days and weeks behind you, AgentValley's History, in the notch panel, shows what each project cost at API prices, by day, week or month, down to its sessions. It keeps the numbers on your Mac after Claude Code clears its old files, and hands a month over as a PDF.
AgentValley is free and open source.
A small valley of programmers in your notch. Needs macOS 15 or later and Claude Code.