DEV Community

Raunak Pathak
Raunak Pathak

Posted on

Your Claude Code bill and your Claude Code quota are two different problems

(Written with AI help and edited by me.)

A lot of the token tools for Claude Code answer one question: what would this have cost on the API? That's useful if you pay per token. But most people I see complaining on r/ClaudeCode are on Pro or Max, and their question is different: why did I hit my 5-hour or weekly limit so fast, and what do I change?

Those need different answers.

Cost view vs quota view

  • Cost view: sums input, output and cache tokens per session and multiplies by API prices. Great for budgeting API spend.
  • Quota view: looks at which habits made usage pile up: cold cache rebuilds after a break, big always-loaded context, subagent fan-out, mid-session model switches. Anthropic doesn't publish exactly how each token type counts against plan limits, so the useful output is a ranked list of habits to change, not a dollar figure.

The usual culprits I found in my own logs

  1. Resuming after a break. The prompt cache expires, so the next turn re-reads the whole context at full price. /compact or /clear before you step away helps.
  2. Always-loaded context. CLAUDE.md and every MCP tool definition ride along on every turn. /context shows how much; /mcp lets you switch off servers you aren't using.
  3. Subagents. Each one runs its own context. Five parallel subagents is roughly five sessions' worth of reading.
  4. Model choice and switches. Routine edits on Sonnet, save Opus for the hard parts, and pick the model at the start of a session: switching mid-session makes the next request re-read the whole history uncached.

Checking your own logs

Session transcripts are JSONL files under ~/.claude/projects. You can sum them yourself, use ccusage for a cost-style view, or run my free CLI, cc-quota-doctor, which focuses on the quota side: https://github.com/raunakpathak20/cc-quota-doctor-

It runs locally with no network calls. It reads those transcript files plus your CLAUDE.md files, to estimate how much always-loaded context you carry.

There's also an optional paid Pro kit linked in the README (ready-made templates, hooks and a playbook), but the free tool works fine on its own.

Top comments (0)