← Guides
20 November 2026 · Junaid Khalid · 18 min read

Claude Code Usage Monitor: Every Way to Track Tokens, Cost and Limits

A Claude Code usage monitor tells you how many tokens your sessions use and how close you are to a limit. Working alone, the two monitors that ship with Claude Code are enough: /usage and a status line. Add ccusage for history. For a team, use OpenTelemetry or the Claude Code Analytics API, since local tools see one machine.

We checked every command and tool here against Anthropic's docs, the GitHub repos and the store pages on November 20, 2026. Then we ran our own team's Claude Code token logs through the same questions, and a couple of the answers changed which numbers we watch.

Key takeaways

Which Claude Code usage monitor should you use?

Use /usage plus a status line if you work alone on a Pro, Max or Ultra plan, ccusage if you want history and per-day totals, and OpenTelemetry or the Analytics API if you manage a team. The table compares every option we tested or verified.

Monitor What it shows Sees Setup Best for
/usage (built in) Plan bars, session tokens and cost, usage by skill, subagent, plugin and MCP server This machine, last 24 hours or 7 days None Every user, daily check
Status line (built in) 5-hour and weekly percent, session cost estimate, context, cache hit ratio Current session One script Watching usage while you work
ccusage Tokens and estimated cost by day, week, month, session and 5-hour block Local logs on this machine npx ccusage@latest History and per-day totals
Claude Code Usage Monitor (claude-monitor) Live terminal view, burn rate, forecast of when the session runs out Local logs plus status line data uv tool install claude-monitor A second terminal pane
SessionWatcher Usage, cost and rate limits in the Mac menu bar or Windows taskbar, many agents This machine Install app Glanceable desktop view
CodeZeno widget Usage limits and reset times in the Windows taskbar This machine Install app Windows users
Browser extensions claude.ai session and weekly bars claude.ai in that browser Install extension Chat users more than Claude Code users
OpenTelemetry export claude_code.token.usage, claude_code.cost.usage, sessions, commits, lines Every machine you configure Env vars plus a collector Teams with Grafana, Datadog or similar
Console dashboard and Analytics API Per-user spend, lines accepted, tokens by model per day Whole Console organization Admin role or Admin API key API-billed teams
Team or Enterprise analytics Active users, sessions, lines accepted, leaderboard, spend report CSV Whole claude.ai organization Owner or Admin role Seat-based teams

Our picks:

How do you check Claude Code usage with /usage?

Type /usage at the Claude Code prompt. API users see the current session's tokens and cost under Session. Subscribers see plan usage bars, activity stats and a breakdown of what used their limits.

The Claude Code costs doc shows the Session block like this (one line trimmed):

Total cost:            $0.55
Total duration (API):  6m 20s
Total duration (wall): 6h 33m 10s
Usage by model:
   claude-sonnet-4-6:  1.2k input, 5.3k output, 940.0k cache read, 50.0k cache write ($0.55)

Look at the ratio in that sample: 940,000 cache-read tokens against 1,200 fresh input tokens. That shape is normal, and it is why raw token totals look frightening.

Three parts of /usage are worth knowing:

  1. Attribution. On Pro, Max, Ultra, Team and Enterprise plans it lists recent usage by skill, subagent, plugin and individual MCP server as a share of the total.
  2. Recommendations. Rows such as 25% Trim ~/code/api/CLAUDE.md · 49k tokens per request. On v2.1.305 or later, press f to have Claude Code apply the ones it can.
  3. Prompt cache line. From v2.1.251, a Prompt cache (main) line shows the share of input served from cache, misses and whether the cache is warm.

The limit to remember is scope. From the costs doc:

"The figures are approximate and computed from local session history on this machine, so usage from other devices or claude.ai is not included."

Press d or w to switch between 24 hours and 7 days. For what the 5-hour and weekly bars mean per plan, see our Claude usage limits guide.

/context is the companion command. It draws what fills the current context window, which is where most per-request tokens come from.

How do you watch Claude Code token usage live?

Configure a status line. Claude Code sends your script a JSON object after each update, including cost.total_cost_usd, context_window.used_percentage, prompt_cache.hit_ratio and, for Pro, Max and Ultra subscribers, rate_limits.five_hour and rate_limits.seven_day.

Our limits guide already has a script for the 5-hour and weekly bars. This one tracks the token side: context fill, estimated cost and cache health. A cold cache is the moment the next message re-processes your whole conversation.

Copy this: a status line for tokens, cost and cache

Save as ~/.claude/statusline.sh, run chmod +x ~/.claude/statusline.sh, and install jq if you need it.

#!/bin/bash
input=$(cat)
MODEL=$(echo "$input" | jq -r '.model.display_name // "Claude"')
COST=$(echo "$input" | jq -r '.cost.total_cost_usd // 0')
CTX=$(echo "$input" | jq -r '.context_window.used_percentage // 0')
HIT=$(echo "$input" | jq -r '.prompt_cache.hit_ratio // empty')
WARM=$(echo "$input" | jq -r '.prompt_cache.warm')

OUT="[$MODEL] ctx $(printf '%.0f' "$CTX")% | est \$$(printf '%.2f' "$COST")"
[ -n "$HIT" ] && OUT="$OUT | cache $(awk -v h="$HIT" 'BEGIN{printf "%.0f", h*100}')%"
[ "$WARM" = "false" ] && OUT="$OUT (cold)"
echo "$OUT"

Point statusLine in ~/.claude/settings.json at it with "type": "command" and "command": "~/.claude/statusline.sh". We tested it with sample input and got [Opus] ctx 42% | est $3.46 | cache 96% (cold).

Two caveats from the status line docs: the cost field is "computed client-side at list price" and "may differ from your actual bill", and prompt_cache ignores subagent requests. You can also type /statusline with a plain description and Claude Code writes the script for you.

Which third-party Claude Code usage monitors are worth installing?

ccusage and Claude Code Usage Monitor are the two worth installing for most people. Both read the session logs Claude Code keeps on your machine, both are open source under MIT, and both run on your machine.

ccusage. The most used tool in this category, with about 19,500 GitHub stars and version 20.0.51 on npm as of November 20, 2026. It reads local logs for Claude Code, Codex, Gemini CLI, GitHub Copilot CLI and 16 other sources. The commands you will use:

npx ccusage@latest          # all detected sources by day
npx ccusage@latest monthly  # one row per month
npx ccusage@latest session  # one row per session
npx ccusage@latest blocks   # Claude Code 5-hour windows
npx ccusage@latest claude daily  # Claude Code only

Its dollar figures are estimates from token counts and model prices, not your bill. On a subscription they tell you what the same work would cost on the API, which is useful when you weigh a plan against pay-as-you-go.

Claude Code Usage Monitor (claude-monitor). About 8,800 stars. Install with uv tool install claude-monitor or pip install claude-monitor and run claude-monitor. It shows a live view with burn rate and a forecast of when your session will run out. Its README calls its plan token limits estimates and recommends its status line mode for official limit data. It still lists a max20 plan, which Anthropic renamed Ultra, so set the plan to custom if the presets look wrong.

Desktop widgets. SessionWatcher puts usage, cost and rate limits in the Mac menu bar or Windows taskbar for Claude Code and other agents, from $8.99 as of November 2026 per its site. CodeZeno's open source widget does limits and reset times on Windows.

Browser extensions. The two that rank on page one, Claude Usage Companion and Usage Meter for Claude, show claude.ai session and weekly bars. Usage Meter does not mention Claude Code at all, and Companion needs an extra local program to read Claude Code logs. Their store pages list 19 and 7 users. Fine for chat, thin for Claude Code.

How do you monitor Claude Code usage across a team?

Pick the surface that matches how your developers sign in. API-billed teams use the Console dashboard and the Claude Code Analytics API. Team and Enterprise plans use the claude.ai analytics dashboard and its spend report. OpenTelemetry works on all of them.

Anthropic's costs doc is blunt about which one to use for live numbers:

"OpenTelemetry export works on every setup and is the only option that streams per-user token and cost metrics into your own observability stack in near real time."

The dashboards are still where most leads look first. Here is what each one actually holds, per the analytics docs:

Copy this: yesterday's tokens per developer from the Analytics API

curl -s "https://api.anthropic.com/v1/organizations/usage_report/claude_code?starting_at=2026-11-19&limit=20" \
  -H "anthropic-version: 2026-10-21" \
  -H "x-api-key: $ANTHROPIC_ADMIN_KEY" \
| jq -r '.data
  | group_by(.actor.email_address // .actor.api_key_name)[]
  | [(.[0].actor.email_address // .[0].actor.api_key_name),
     ([.[].model_breakdown[].tokens | .input + .output + .cache_read + .cache_creation] | add)]
  | @tsv'

You get one line per developer or API key with that day's total tokens. The grouping step is there because the API can return several records for one person on one day, split by terminal type and plan. When has_more is true, call again with next_page until it comes back false. We ran the jq part against the response shape in Anthropic's docs before putting it here.

This page is about choosing the monitor. For the full per-developer setup, use our guide to tracking Claude Code usage per developer.

How do you set up OpenTelemetry monitoring for Claude Code?

Turn it on with CLAUDE_CODE_ENABLE_TELEMETRY=1, pick an exporter and give it your collector's address. From then on Claude Code sends claude_code.token.usage (split into input, output, cacheRead and cacheCreation) and claude_code.cost.usage per model, along with sessions, commits, pull requests and active time.

Copy this: OpenTelemetry env block with team labels

export CLAUDE_CODE_ENABLE_TELEMETRY=1
export OTEL_METRICS_EXPORTER=otlp
export OTEL_LOGS_EXPORTER=otlp
export OTEL_EXPORTER_OTLP_PROTOCOL=grpc
export OTEL_EXPORTER_OTLP_ENDPOINT=http://collector.internal:4317
export OTEL_METRIC_EXPORT_INTERVAL=60000
export OTEL_RESOURCE_ATTRIBUTES="department=engineering,team.id=platform,cost_center=eng-123"

Replace the endpoint with yours. The monitoring docs say to confirm the pipe works by looking for claude_code.session.count in your backend. Two gotchas from the same page: values in OTEL_RESOURCE_ATTRIBUTES can't contain spaces, and every key becomes a metric label, so a long list raises your storage bill.

The label we would chart first is agent.name. The token metric also carries skill.name and mcp_server.name, which is how you find the subagent or MCP server doing most of the reading. Our own numbers further down show why that comes first. One catch: custom subagent names arrive as "custom" and user-configured MCP servers as "custom" too, unless you also set OTEL_LOG_TOOL_DETAILS=1.

One trap when you reconcile with a bill: input "excludes tokens read from or written to the prompt cache," per the docs. Add cacheRead and cacheCreation back in before comparing.

Already on Sentry? Its Claude Code cookbook installs a plugin that records each session as a trace, with token counts on every turn. For how traces and spans fit agents in general, see our AI agent observability guide, and the OpenTelemetry Collector docs for running the collector.

Why don't Claude Code usage numbers match?

Because every monitor counts a different slice. /usage sees one machine, the cost fields are list-price estimates, the Analytics API runs about an hour behind, and third-party tools guess plan limits.

The usual causes:

For turning those token counts into a budget, our Claude Code pricing breakdown has the per-plan and per-token math.

What did our own Claude Code token data show?

We pulled the logged Claude Code usage from our team's workspace through November 20, 2026: 16.4 billion tokens across 517 sessions, nearly all of it from November. These are the numbers that changed what we monitor.

Metric Our share
Cache reads 96.9% of all tokens
Cache writes 2.7%
Output 0.37%
Uncached input 0.02%
Tokens used by subagents 66.5%
Tokens from the heaviest 10% of sessions 91.1%
Tokens tied to a ticket 88.8%

Most tokens were cache reads. Output, the text and tool calls Claude actually wrote, was under half a percent. If a monitor shows you only output tokens, you are looking at a sliver of the usage.

Subagents used two thirds of the tokens. Only 15.5 percent of our sessions started any subagents, but those subagent runs added up to 66.5 percent of all tokens. That makes /usage attribution and the agent.name label in OpenTelemetry the first places to look. Our notes on Claude Code agent teams cover keeping that in check.

A small number of sessions did most of the using. The median session used about 432,000 tokens. The heaviest tenth of sessions used 91 percent of all tokens, and 89 percent even with the single largest session left out. A per-developer average would have hidden that.

About one token in nine had no ticket. 11.2 percent of tokens came from sessions nobody had opened a ticket for, so we could not say what that work was for. The next section is about closing that gap.

How do you tie Claude Code usage to the work it did?

Record tokens against the task, not only the person. Every monitor above answers "how much" and "who". None of them knows which feature, bug or client a session was for, so a big week shows up as a number with no story.

The simplest method is a rule that every agent session starts on a ticket and reports its tokens when it stops. That is how we run it in Jenzo. An agent starts its own clock on a ticket with its name and model, reports input, output and total tokens when it stops, and those roll up per ticket, per agent and per person. Its work log adds the files, branch, PR, commits and cost for that ticket, and the AI work report shows hours and tokens per agent per day next to human time.

Whatever tracker you use, the practice is the same. Our cost per ticket guide shows how to turn tokens into dollars per piece of work.

Copy this: a weekly Claude Code usage review

[ ] Run /usage, press w: note the top 3 attribution rows (subagents, MCP servers, skills)
[ ] Run npx ccusage@latest session: list the 5 heaviest sessions
[ ] For each heavy session: which task was it, and was it worth it?
[ ] Check cache hit ratio on long sessions; cold caches mean /clear or /compact sooner
[ ] Compare subagent share with last week; move simple subagents to a smaller model
[ ] Team: pull per-developer tokens from the Analytics API or OTel dashboard
[ ] Flag any session over 10 times the median for a look
[ ] Save the ccusage monthly output before the 30-day log cleanup removes it

FAQ

How do I check my usage in Claude Code?

Type /usage at the prompt. On a Pro, Max or Ultra plan you get the 5-hour and weekly bars, activity stats and a list of which skills, subagents, plugins and MCP servers used the most. On an API key you get the session's tokens and estimated cost instead. /cost and /stats open the same screen, and it only covers sessions on that machine.

Is there a Claude Code usage dashboard?

For organizations, yes. Console admins have one at platform.claude.com/claude-code showing spend and lines accepted per member. Team and Enterprise owners have one at claude.ai/analytics/claude-code with active users, sessions and a leaderboard. If you are on a personal Pro, Max or Ultra plan there is no dashboard; you use /usage and the Usage page in the Claude app's settings.

How do I see Claude token usage for the whole month?

On your own machine, npx ccusage@latest monthly totals every agent CLI it finds, and npx ccusage@latest claude monthly narrows it to Claude Code. On the API, the Console's Cost page gives organization totals, and Anthropic's Usage and Cost Analytics API (the newer replacement for the legacy Usage and Cost API) returns them by model. Save old months somewhere: Claude Code clears local session data after 30 days unless you change cleanupPeriodDays.

How does the Claude Code token limit work?

There are two different ceilings. The context window caps how many tokens a single conversation can hold, and /context shows how full it is right now. Plan limits cap how much you can use per 5-hour session and per week, and on paid plans that pool is shared with the Claude app. Our usage limits guide lists them per plan.

Why is Claude Code usage not showing?

Usually one of four things. The status line's rate_limits object exists only for Pro, Max and Ultra subscribers, and only after the session's first response. API key users see session cost, not plan bars. The Analytics API leaves out the most recent hour. And Anthropic's help center says users missing from Team and Enterprise analytics may need Claude Code 2.0.28 or later.

How much is 1 million tokens in coding?

It depends on which kind of tokens. Anthropic's pricing page, as of November 2026, lists Sonnet 5.5 at $2 per million input tokens, $10 per million output tokens and $0.10 per million cache hits. Most Claude Code tokens are cache hits (96.9 percent in our logs), so a million tokens of real work costs much less than a million fresh input tokens.

From our own experience

When we pulled our own logs for this article, getting the numbers was easy and explaining them was not. The surprise was how little of the total was output: under half a percent. Two thirds of the tokens came from subagent runs, and about one token in nine sat in a session with no ticket, so nobody could say what it paid for. Our agents already start work on a ticket, which is why the other 88.8 percent had a story; the untagged slice is the gap we watch now. If you set up monitoring from scratch, watch cache health and subagent share before any single token total.

Let your agents keep the board.

Claude Code, Codex and Cursor open their own tickets, log hours and tokens, and close them with the commit.

Connect your agent