How to check Claude Code usage: five ways, fastest first

There is a fast answer, a permanent answer, and a complete answer, and most people only know the first one exists. Here are all five, ordered by how long they take to get and how often you have to remember to ask.

By the Continuum team. We build a workbench that runs Claude Code, Codex, and their peers, so the model rates quoted here are the ones our own cost analytics ship with.

The short version

Run /usage inside Claude Code for plan headroom and this session's tokens. For a permanent readout, configure a status line: Claude Code pipes rate_limits.five_hour and rate_limits.seven_day percentages to your script on stdin. For history, run npx ccusage@latest against the JSONL transcripts. For a team, use the Console dashboard or the Claude Code Analytics API.

What you need to know
  • /usage is the two-second answer, and /cost is now an alias for it.
  • The status line receives live 5-hour and 7-day quota percentages on stdin. This is the best answer.
  • npx ccusage@latest gives you full history with no install.
  • The /usage breakdown only sees this machine. Two laptops means two partial pictures.
  • Organisations get per-user aggregates from the Claude Code Analytics API.

The five ways

Ordered by how quickly they answer, and whether you have to ask.

MethodAnswersEffortLive quotaHistory
/usagePlan bars plus session tokens2 secondsYesLast 24h or 7d
Status line scriptWhatever you print, always on screenOne config lineYesWhatever you script
ccusageFull token and cost history30 secondsNoYes, complete
Console dashboardPer-member spend for an orgA loginNoYes
Analytics APIPer-user daily aggregatesA scriptNoYes

Inside the CLI

01

Run /usage

/usage

On Pro, Max, Team, or Enterprise you get progress bars for the 5-hour and weekly windows, plus a session block with tokens and a dollar figure by model. On an API key you get the session block only, because there are no plan windows to draw.

02

Toggle the breakdown window

d   last 24 hours
w   last 7 days

The breakdown attributes recent usage to skills, subagents, plugins, and individual MCP servers, and flags behaviors such as long context or cache misses when one accounts for 10 percent or more. This is the fastest way to find out why a quiet week burned a lot of quota.

03

Check what is filling the context

/context

Not a usage command, but frequently what people actually want. It visualises what is consuming the context window, which is the thing you can fix immediately with /compact or /clear. Context pressure and quota pressure are different problems with different fixes.

Put quota in your status line

This is the highest-value option and almost nobody uses it. Claude Code runs a shell command to render its status line and pipes a JSON blob of session state to it on stdin. That blob includes your live plan percentages.

The fields that matter, from the documented status line schema.
{
  "rate_limits": {
    "five_hour":  { "used_percentage": 23.5, "resets_at": 1738425600 },
    "seven_day":  { "used_percentage": 41.2, "resets_at": 1738857600 }
  },
  "cost":   { "total_cost_usd": 0.01234 },
  "model":  { "display_name": "Opus" },
  "context_window": { "used_percentage": 8 }
}
01

Write the script

~/.claude/statusline.sh
#!/usr/bin/env bash
input=$(cat)

model=$(jq -r '.model.display_name'                      <<< "$input")
dir=$(  jq -r '.workspace.current_dir'                   <<< "$input" | xargs basename)
h5=$(   jq -r '.rate_limits.five_hour.used_percentage // 0' <<< "$input" | cut -d. -f1)
d7=$(   jq -r '.rate_limits.seven_day.used_percentage // 0' <<< "$input" | cut -d. -f1)
cost=$( jq -r '.cost.total_cost_usd // 0'                <<< "$input")

printf "%s | %s | 5h %s%% | 7d %s%% | $%.2f" \
  "$model" "$dir" "$h5" "$d7" "$cost"

Then make it executable with chmod +x ~/.claude/statusline.sh.

02

Point Claude Code at it

~/.claude/settings.json
{
  "statusLine": {
    "type": "command",
    "command": "~/.claude/statusline.sh",
    "padding": 2
  }
}

Settings reload automatically, but the change appears on your next interaction rather than instantly.

03

Let Claude write it instead

/statusline show model, 5 hour and weekly limit percentages, and a context bar

The /statusline command takes plain English, generates a script under ~/.claude/, and updates your settings for you.

Full history from the session files

Claude Code writes a JSONL transcript for every session. ccusage reads them and aggregates, and needs no installation:

The fastest complete answer available.
# daily totals across every detected agent CLI
npx ccusage@latest

# other groupings
npx ccusage@latest weekly
npx ccusage@latest monthly
npx ccusage@latest session

# just Claude Code, grouped by project
npx ccusage@latest claude daily --instances

# the current 5-hour block, with projections
npx ccusage@latest blocks --active

This works retroactively, because the data was already being written before you installed anything. The first time anyone runs it they usually discover weeks of history they did not know they had.

When two answers disagree

You will eventually get two different numbers for the same week and assume one tool is broken. Usually neither is. These are the five reasons, in the order they actually occur.

Why two usage figures for the same period differ.

SymptomCauseWhich is right
One tool is higher on tokensIt is not deduplicating repeated records after resumes and retriesThe lower one
One tool is missing whole daysTranscripts older than cleanupPeriodDays were sweptNeither; the data is gone
The dollar figures differOne prices at list rates, one at your contracted rateYour invoice
Day boundaries are off by oneOne buckets in UTC, one in your local timezoneWhichever matches your reporting
A whole machine is missingBoth are reading local files, and you work on two machinesNeither, on its own

Quota is different. A status line re-runs only on events, such as a new assistant message or a refreshInterval tick, so between turns it is displaying the last values it was handed while a fresh /usage call asks now. A small gap between the two is normal and closes on your next message.

For a team or an organisation

None of the above scales past one machine, because the transcripts are local. Which route you take depends on how your organisation signs in.

Per-user reporting by setup, as documented in August 2026.

Your setupWhere per-user numbers come from
Claude Console (API)Console dashboard, or the Claude Code Analytics API
Claude for TeamsThe spend report CSV in org analytics
Claude EnterpriseThe Enterprise Analytics API, with an analytics key
Bedrock, Google Cloud, or Microsoft FoundryOpenTelemetry export, or an LLM gateway
The Analytics API needs an Admin key, not a normal API key.
curl "https://api.anthropic.com/v1/organizations/usage_report/claude_code?starting_at=2026-08-01&limit=100" \
  -H "anthropic-version: 2023-06-01" \
  -H "x-api-key: $ADMIN_API_KEY"

One call returns one UTC day of per-user records: sessions, lines added and removed, commits, pull requests, tool acceptance rates, and token and cost figures per model. Data lands with up to an hour of delay, and the endpoint is free.

Questions people ask

/usage, run inside an interactive session. It shows plan progress bars for the 5-hour and weekly windows plus this session's tokens and cost. /cost is an alias for the same screen as of August 2026.

Run npx ccusage@latest, which reads the JSONL transcripts under ~/.claude/projects/ and aggregates them by day, week, month, or session. It works retroactively over data already on disk.

Yes. Configure a status line and read rate_limits.five_hour.used_percentage and rate_limits.seven_day.used_percentage from the JSON Claude Code pipes to your script on stdin. The result renders in your prompt permanently.

Yes. ccusage reads the transcript files from any shell, and a desktop or menu-bar monitor shows live quota with no session open.

Because the breakdown is computed from local session history on that machine, and transcripts are swept after cleanupPeriodDays, 30 days by default. Longer history has to come from a tool that stores its own copy.

Use the Claude Code Analytics API with an organisation Admin key for per-user daily aggregates, the Console dashboard for spend per member, or the OpenTelemetry exporter if you run your own metrics stack.

The status line runs locally and consumes no API tokens. Anthropic notes that some background functionality, including commands such as /usage that check status, generates small requests, typically under $0.04 per session.

Not from Anthropic directly. Continuum mirrors live quota gauges to iPhone and Apple Watch from the machine running your sessions.

Sources

Every figure above was read from these pages on August 2026. Vendors reprice without notice; if you find a stale number, tell us.

  1. Claude Code: manage costs effectively
  2. Claude Code: customize your status line
  3. Claude Code Analytics API
  4. ccusage on GitHub
Try it

Never have to
ask again.

Continuum keeps a live quota gauge in the menu bar and on your phone, so the answer is already on screen when you need it.

free app · your subscriptions · local-first