Guide · Usage
How to Track Claude Code Usage, Tokens, and Spend
Claude Code can consume an individual Claude subscription, an eligible Team or Enterprise seat, or usage from an Anthropic Console API key. Those paths do not report cost in the same way. A Pro or Max user is consuming plan capacity; an API-key user is creating metered token spend; an organization may also have administrator analytics.
Evidence key: Observed — the revision date the editorial source publishes for this article.
Source: ModelScale guide /articles/track-claude-code-usage (reviewed 2026-09-17). Provider links in the reference should be checked before purchase.
1. Identify the billing path before reading the numbers
Start each setup by checking which account is signed in and whether an ANTHROPIC_API_KEY is intentionally present in the environment. This prevents a common mistake: assuming a session is covered by a subscription while it is actually billing the API account.
Official references Models, usage, and limits in Claude Code ↗ Use Claude Code with Pro or Max ↗
2. Check usage, cost, and context inside the session
Claude Code exposes different views for different questions. Use /usage to inspect plan and rate-limit status, /cost to review session token usage and spend when cost reporting applies, and /context to see what is occupying the current context window. /model helps confirm which model the session is using before a large task begins.
Check these views at natural boundaries: after repository exploration, before a large refactor, and after a tool-heavy debugging loop. The goal is not constant surveillance. It is to catch a growing context, an unexpectedly expensive model, or an unintended billing path while the session is still easy to correct.
- At the start, confirm the signed-in account and selected model.
- After exploration, open /context and remove or compact material that no longer helps the task.
- For API-billed work, check /cost after a representative task and use it as a baseline—not a guarantee for every future task.
- For subscription work, check /usage before starting another long agentic run.