Anatomy of a $5 "Good Morning"

ingve1 pts0 comments

Anatomy of a $5 'Good Morning' - Karan Bansal

Last month a thread hit the front page of r/ClaudeAI: someone topped up $250 in API credits, typed "hey", and watched about $20 disappear. 1,612 upvotes, 421 comments. The comments got the diagnosis roughly right (caching, context, "stupid tax") and then the thread scrolled away, because nobody could link a writeup that showed the actual mechanics with actual numbers.

So I priced every request Claude Code has ever made from my machine: 923 transcript files, 12,992 API calls. It turns out I have been paying the same tax, repeatedly, without noticing. My most expensive requests ever are not big refactors or deep research runs. They are an acknowledgment, a menu choice, a couple of impatient nudges, and a parade of good mornings.

This post is the anatomy of one of them: "Good morning.. let's do clean up now?", a message that metered 66 fresh input tokens and billed $5.18 . Along the way it answers the thread's question properly, because the mechanics generalize: your bill is not proportional to what you type. It is proportional to what the harness re-establishes.

TL;DR

Every message you send re-sends the entire session context. Prompt caching makes that nearly free while you stay active, because reading cache is 20x cheaper than writing it and every read refreshes the timer. Claude Code's main loop uses a 1-hour cache: come back at minute 59 and a huge session costs cents, come back at minute 61 and you rebuy the whole context at 2x the base input price. Subagents run on the cheaper 5-minute tier. Compaction resets the meter. A 60-line script at the end prices your own transcripts.

This is a sequel to Prompt Caching Doesn't Cache Prompts. That post covered what the cache stores and why prefixes must match exactly. This one is about what those rules do to a real month of agent usage, receipt by receipt. I use Claude Code on a subscription, so no invoice shows these dollars: every figure here is my metered token counts priced at Anthropic's published API list rates, a shadow bill. Subscription usage limits meter the same underlying consumption, so the mechanics cost you either way; the dollars just make them visible.

The receipt

On June 27 I opened a session that had been idle overnight and typed 41 characters: "Good morning.. let's do clean up now? 230". Here is the usage block the API returned, verbatim from the transcript on my disk:

"usage": {<br>"input_tokens": 66,<br>"cache_creation_input_tokens": 512749,<br>"cache_read_input_tokens": 15877,<br>"output_tokens": 1688,<br>"cache_creation": {<br>"ephemeral_1h_input_tokens": 512749,<br>"ephemeral_5m_input_tokens": 0

Priced at Opus 4.8 list rates:

Line itemTokensRateCost

Fresh input (what I typed, plus wrappers)66$5 / MTok$0.0003<br>Cache read (the stable head that survived)15,877$0.50 / MTok$0.008<br>Cache write, 1-hour tier (the whole session, rebuilt) 512,749 $10 / MTok $5.13<br>Output (the reply)1,688$25 / MTok$0.04<br>Total $5.18

99% of the bill is one line item, and it has nothing to do with what I typed. The session's cache had expired overnight, so the API re-processed the entire 500K-token conversation history and wrote it back into cache at $10 per million tokens. My greeting was a rounding error riding on a re-establishment.

It gets better. My single most expensive request ever, across all 12,992, was the message "done.. single commit shows up now": six words of acknowledgment that triggered a 767,616-token cache write. Here is the leaderboard (my five priciest Opus 4.8 turns, at list prices):

What I typedCache writeBill

"done.. single commit shows up now"767,616$7.72<br>"both 1 and 2 Submit maximum"629,347$6.35<br>"Morning, it's july 5 I tink we should do next..."568,315$5.74<br>"lets' trigger job to do clean up of 279 today?"525,814$5.31<br>"Good morning.. let's do clean up now? 230"512,749$5.18

Typos preserved, because that is the point: these are throwaway messages. Nobody types "both 1 and 2" expecting it to be a six-dollar decision. (An Opus 4.7 receipt from the same archive deserves an honorable mention: telling the agent that em dashes scream AI-generated cost $6.06.)

What a tiny message actually sends

The LLM API is stateless. It remembers nothing between calls. So on every turn, the harness re-sends everything the model needs to act like your session exists: the system prompt, tool definitions, your CLAUDE.md and memory files, and the full transcript so far including every file it read and every command output it saw. Your new message is the last few tokens on top of that stack.

One request to the API (my June 27 turn: 528,692 input-side tokens)

Stable head<br>system + tools<br>Config<br>CLAUDE.md<br>Session transcript<br>every file read, every diff, every tool result

what you typed: 66 tokens

what the API meters: 528,692 tokens

Across my whole archive, the average API call carries about 145,000 input-side tokens. The messages that trigger those calls are often a dozen words. That ratio is normal, healthy agent operation, and it...

cache tokens session good morning typed

Related Articles