A Claude bill has more lines than 'tokens × price'. Per call you pay for: input tokens, output tokens, cache write tokens (if you used cache_control), cache read tokens (if you got a hit), tool invocation tokens (server tools), and image tokens (computed from dimensions). Each rate differs; planning at the line level prevents surprises.
Find the dominant line
For chat workloads, output tokens often dominate (long answers). For RAG-stuffing workloads, input tokens dominate. For repeated-context workloads with caching, cache reads dominate (cheap) and cache writes are rare. Knowing which line dominates tells you where the next dollar saved comes from.
Track per-feature, not per-bill
The Anthropic Console shows org-level billing. To know which feature drives cost, tag every call with a feature label and aggregate yourself. cwkPippa logs feature: 'chat' | 'heartbeat-weather' | 'council' per call and computes per-feature cost from JSONL — the bill is then explainable to the household budget meeting.
Principle: The bill has shape. Find the dominant line, optimize that, ignore the rest.
Add per-feature cost logging to your project. Run for a week. Identify the top three features by cost and pick one to optimize. Write down what you intend to change before you change it.
Hint
Cost optimization without measurement is superstition. Measure first, then choose where to spend effort.
Progress
Progress is local-only — sign in to sync across devices.