How Claude Code cost works
Claude Code cost comes from the tokens each model call uses. Learn which kinds of tokens there are and what each costs, then look at your own usage.
Data as of 2026-10-31
How Claude Code cost accrues
Each model call is billed on input tokens, output tokens and cache tokens. Claude Code sends the context so far with every call, so input grows over a long session; prompt caching makes the repeated part cheaper.
- Input and output: priced separately, and output usually costs more (see the table).
- Cache reads: cached input is charged at a lower price. It is not one flat discount; each model has its own cache-read price (see the table).
- Cache writes: 1.25x the input price for the 5-minute cache or 2x for the 1-hour cache.
Multipliers and prices follow the official Anthropic pricing page. Budgethelm amounts are estimates, not invoices; your Anthropic bill is authoritative.
Anthropic model prices
| Model | Input | Output | Cache read | Checked (official pricing page) |
|---|---|---|---|---|
claude-fable-5-2 | $8.00 | $40.00 | $0.20 | 2026-11-10 |
claude-fable-5-1 | $10.00 | $50.00 | $0.25 | 2026-10-31 |
claude-opus-5-5 | $4.00 | $20.00 | $0.20 | 2026-10-31 |
claude-opus-5 | $5.00 | $25.00 | $0.50 | 2026-10-31 |
claude-sonnet-5-5 | $2.00 | $10.00 | $0.10 | 2026-10-31 |
claude-sonnet-5 | $2.00 | $10.00 | $0.20 | 2026-10-31 |
claude-sonnet-4-6 | $3.00 | $15.00 | $0.30 | 2026-10-31 |
claude-haiku-5-5 | $0.10 | $0.50 | $0.01 | 2026-10-31 |
claude-haiku-4-5 | $1.00 | $5.00 | $0.10 | 2026-10-31 |
* These rows carry conditions (long-prompt surcharge, peak or promotional pricing). The official page is authoritative.
Each date links to the official pricing page. For other models see the model price comparison and the cost calculator.
How Budgethelm tracks Claude Code
Once connected, Budgethelm reads Claude Code's own session logs in the background (jsonl files under ~/.claude/projects) and totals tokens and cost by tool, computer and model. Only time, tool, model, token counts and stop records are uploaded; conversations, code and API keys stay on your computer. Calls whose log has no cost are estimated from the built-in price list and labelled as estimates.
When Claude Code gets stuck
When an agent keeps failing or reruns the same command, every round burns tokens. The Budgethelm guard hook counts failures and repeated commands and stops Claude Code when a threshold is reached, including unattended runs such as claude -p and scheduled jobs. The thresholds are listed on the home page under "When it stops an agent".
Benchmark (a local fake model returning the same error on every step):Claude Code (claude -p),without Budgethelm:60 calls, until it hit --max-turns 60;with it:Stopped at call 6。Method and the other tools are on the home page。
FAQ
- How much does Claude Code cost per month?
- There is no single number. It depends on the model, how many runs a day and how long the context is. Use the price table above with the cost calculator: enter your own tokens and call counts to get a daily and monthly range.
- Does the Budgethelm amount equal my Anthropic bill?
- No. Calls that report cost are added up as reported; the rest are estimated from the built-in price list and labelled as estimates. Your Anthropic bill is authoritative.
- Does it track and stop claude -p or scheduled scripts?
- Yes. The same guard hook was tested on claude -p: 60 calls without it, stopped at call 6 with it.