Claude Code Token Usage

  • Desktop, mobile and web
  • All plans

What it does

Two meters, both computed on your machine from the files the CLIs already write. Per session: a live token counter in every agent's composer, which turns orange then red as the session grows, and opens a Session info panel with input, output, cache write and cache read tokens, cache hit rate, context window fill, exchanges, tool uses, models routed, files read, an indicative API-rate cost and ready-made tips to consume less. Per account: the footer Usage badge and panel show how much of each provider's quota you have burned (session, daily, weekly, monthly windows), for every signed-in account, and estimate how that quota splits across your projects and agents. Accounts you pin from that panel each get their own gauge in the status bar, and every bar carries a bell that warns you when it crosses a threshold (see Usage Alerts). Weekly and monthly bars carry a pace marker, a thin tick at what you may have spent by now: the fill left of it means you are within budget, and the line under the bar says how many points ahead or under pace you are, or, in the last 24 hours, how much budget the reset is about to throw away. By default the marker spreads the quota evenly over the whole window; tell AgentsRoom the days you actually work and each work day unlocks an equal share instead (5 days = 20 % a day). Hover the tick or the line for the explanation, your average per work day, where it lands at the reset and, on weekly bars, a Day by day chart: how much of the week each day took, against a dashed daily budget. That history is recorded on your machine from the moment AgentsRoom reads the gauge, so it cannot go back before that: what was spent earlier is shown as one figure. Nothing is sent anywhere.

Where to find it

  • Composer action row of an agent terminal, next to the send button: the N tok badge. Click it for Session info.
  • Footer: the usage badge with the shortest available window, click for the Usage panel. Since 2026-09-25 it is a wide panel in two columns. The header holds the title, the Usage alerts switch and the refresh button (Refresh all providers).
  • Gauges refresh by themselves when a quota window resets: since 2026-10-01, a bar that shows a reset time is read again just after that time (then once more a minute later), so it drops back without waiting for the next periodic refresh or a click on Refresh. All providers whose bars carry a reset time; the phone shows the bars the desktop sends.
  • Left column, CLI usage: the gauges, one section per provider, one header per account, Refresh {provider}, and Show this one in the status bar on a bar to pick the window it shows. On each account header (or on the provider header when it has a single account): the pin Show this account in the status bar. Pinned accounts also appear under Settings > AI providers & accounts > Quotas in the status bar, with the Side by side / Compact choice once two are pinned.
  • Right column, everything that acts on those gauges, top to bottom: the Temporary launch override card ("Your resources are running low." with Temporarily change model when a quota is nearly spent, Stop override while one is active; it replaced the Launch override chip of the footer on 2026-09-23), the Quota management card that opens the quota rules (see Quota Rules), the By project and agent split, then Optimize your usage, one card per line: AI Suggestion, Adaptive mode, the Vibe Coding Optimizer audit and Robin Hood (Compare plans, see Robin Hood). The old account failover switch is gone: it became quota rules.
  • Opening the panel scrolls to the provider the footer gauge was showing (the foreground agent's, else the first pinned account, else the most urgent provider).

How to use it

  1. Work as usual; the badge updates every few seconds. Orange means the session is getting large, red means it is very large: consider /compact.
  2. Click the badge. Session info shows the cumulative tokens, the cache hit rate (higher is better: cache reads cost roughly a tenth of fresh input) and the Context window fill of the last turn. The session id is copyable for a manual --resume.
  3. Under Tips to consume less, each tip has Fix this: an editable prompt you can send to the agent, copy, or save to the Prompt Library.
  4. Click the footer badge to see quota per provider and per account, with the reset time. By project and agent splits the account's percentage across what ran on this machine, weighted by the estimated cost of each session; the figures are labelled as estimates.
  5. To keep several accounts in sight, click the pin on their headers. With nothing pinned the footer shows one figure, the account the foreground agent is spending. With pinned accounts, Side by side draws one pill per account (logo, percentage, filled gauge, the account name in the tooltip when the provider has several), Compact draws a single pill with the most-urgent pinned account and "+N"; hover it to list them all with a mini gauge. Any pill opens the same panel. A pinned account with no reading yet keeps a logo-only pill ("no reading" in the list); unpin the last one to get the single badge back.

Settings

  • usageBadgeWindow (global): which quota window the footer badge shows per provider (session, daily, weekly, monthly); unset = the shortest available.

  • usageBadgeAccounts (global, Settings > AI providers & accounts > Quotas in the status bar): { pinned: ["<provider>|<account slot>", ...], layout: "row" | "compact" }. Empty pinned = the single badge of the account being spent. Machine-local, not synced to the account. Since 1.180.0.

  • usageAlerts (global, Settings > Notifications > Usage alerts): thresholds and channels of the bell on each bar, see Usage Alerts.

  • Quota breakdown per project and agent: opt-in from the beta panel (Settings > Beta), on the desktop; the phone shows it only when the desktop has it on.

  • Show or hide the footer badge: Settings > Interface elements (uiElements.footer.usage).

  • usagePace (global, Settings > AI providers & accounts > Quota pace: work days, also reachable from Set work days in the pace card of a usage bar): { workDays: [0-6], byAccount: { "<provider>|<account slot>": [0-6] } }, 0 = Sunday. Default: all seven days, the marker is a continuous prorata of the window. With days off, the window is cut into 24 h slots counted from the reset and each worked slot unlocks an equal share of the quota as soon as it starts. Own days on an account line gives that account its own days (a work subscription on weekdays, a personal one on weekends). Machine-local.

  • featureFlags.usagePace (global, Settings > Features > Quota pace, default on): turns the whole pace marker off (tick, pace line, card, the work-day setting, the phone's marker and the pace fields of usage_overview).

Agent tools (MCP)

  • usage_overview: read-only, anonymous. Per provider, whether it exposes a quota signal and, per signed-in account (account: its email or name; profile: the name it was given in Settings, empty for the CLI's own sign-in, which is marked systemAccount), the usage bars (percent used, window, reset label, machine-readable resetsAtIso; on weekly and monthly bars the pace: windowStartIso, windowSeconds, expectedPercentUsed, paceDelta, paceStatus, unusedBudgetExpiresSoon; on weekly bars dailyUsage and percentUsedBeforeTracking), plus a census of running agents by status and provider. Meant for "how close am I to a limit" and "what is running", never to enumerate agents.

Providers

  • Session info (tokens, cache, cost, files read): Claude Code and Codex, read from their local transcripts (~/.claude/projects/... or the account's directory for Claude, CODEX_HOME/sessions/... for Codex). The cache breakdown is a Claude billing feature. Since 1.184.0 OpenCode agents have the badge too: OpenCode keeps its transcript in a database AgentsRoom cannot read, so the figures are pushed by the AgentsRoom plugin running inside OpenCode, with the input, output, reasoning (counted as output) and cache tokens and the cost OpenCode computes itself, the same numbers its TUI prints, non-zero on the flat-rate OpenCode Go plan as well. The agent's profile stats and the per-provider cost split of the Open space band pick them up. A /new in the OpenCode TUI resets the counter like /clear does for Claude. Antigravity, Grok, Mistral Vibe, Cursor and Aider show no badge.
  • OpenCode counts only what its plugin saw: the earlier turns of a resumed conversation are not recounted, and an OpenCode agent launched from the phone gets no plugin, so no figures.
  • Quota panel: every CLI whose usage AgentsRoom can read: Claude, Codex (since 2026-09-29 every signed-in Codex account is read on its own, with its own sign-in, from the usage endpoint the Codex CLI's /status reads, even when no agent has run on it; the figures of its last session stand in when that read fails, dated), Grok and Kimi through their own usage commands, and since 1.184.0 OpenCode Go through the subscription's usage endpoint, called with the key the OpenCode CLI already stores after /connect (three bars: 5h limit, Weekly limit, Monthly limit; no ghost terminal, so it works on Windows too). A pay-as-you-go OpenCode setup with no Go key shows nothing. Since 2026-09-23 the Z.AI Coding Plan used through OpenCode gets its own block under the OpenCode section, "Z.AI Coding Plan" with the plan level in brackets (5-hour and weekly bars), and OpenCode models show their plan next to the name ("glm-5.3 · Z.AI Coding Plan"). The footer gauge follows the plan the OpenCode agent really uses (the foreground agent, else the project's OpenCode agents when they all use one plan, else OpenCode Go), and stays empty rather than showing another plan's figure. Antigravity shows the 5-hour and weekly windows of each model pool, read from its own /usage panel (agy 1.1.11 or later, see Usage Alerts). A CLI with no usage source (Mistral Vibe or Aider, for instance) is simply not listed in the panel; only Claude keeps its section, so "not detected" stays visible.
  • Context window: sized from the model id, or from the CLI's own startup banner when the model is left on Default (so a Claude 1M session shows the right gauge).

Mobile

Present in part. The phone has a Usage screen with the same per-provider, per-account quota bars, reset times, pace markers and snapshot age (tap a weekly or monthly bar for the pace sheet: the same figures as the desktop card, the Day by day chart, and the work days, which you can change from the phone), and each agent row shows its cumulative tokens, model and context fill in the spec strip. Since 1.184.0 the phone also shows the quota split: under each account of the Usage screen, a By project and agent block (For this project, For this agent, "of the current week" and the other windows), and under the Cost card of an agent's profile sheet the share that agent takes of its account's window. The desktop computes the split and sends it over the encrypted relay; the phone replays nothing, and an agent or project with no measurable share shows nothing, never 0 %. In the bottom tab bar, the Activity label gives way to the same gauge as the desktop footer (threshold dot, provider logo, percentage) for the account of the agent in the foreground, as soon as the desktop has a figure to send. The per-session Session info panel with cache breakdown and tips is desktop-only, and so is account pinning: the phone has no status bar, its Usage segment already lists every account of every provider.

Limits

  • Thresholds are heuristics: the badge turns orange at about one million cumulative tokens and red at about five million. Red is a warning, not a throttle.
  • The indicative cost is what the tokens would bill at raw API rates; on a subscription you never pay it, it is only the weight used to split the plan.
  • Usage from another machine or from the web is outside the split, so project and agent shares are floors, not totals; a model missing from the rate card is flagged.
  • Quota readings can be rate-limited by the provider's API; the panel says so and retries by itself.
  • Grok: when x.ai publishes a billing period without a percentage (a free account, or just after a weekly reset), the account shows no bar and reads as unavailable, never a fake 0 %. A bar whose window has already reset is dropped instead of showing last period's figure. Fixed on 2026-09-25.
  • OpenCode plans connected with a recent OpenCode (which keeps its keys in a local database) are read with the system sqlite3 command. Windows does not ship it: without it, or without an older auth.json, those plans show no bars.
  • Large transcripts (hundreds of thousands of lines) take a moment to parse when Session info is open.

Common questions

  • My Codex bars stayed frozen on yesterday's figures, even with Refresh. Fixed on 2026-09-26: a very long Codex session (a transcript past 50 MB) was skipped, so the bars came from an older session. Its latest quota reading is now read from the end of the file. Update AgentsRoom.

  • I have two Codex accounts but the panel shows one, and the footer shows the other account's percentage. Fixed on 2026-09-29: a Codex account had no reading until an agent ran on it. Every signed-in Codex account is now read on its own (its email appears on its header), and the footer follows the account you set as default or pinned. Update AgentsRoom, then click Refresh Codex. An account whose Codex sign-in has expired says so; it comes back the next time an agent runs on it.

  • Is the token count accurate? Yes for Claude and Codex: it is read from the per-message usage the CLI writes locally, no estimate. The dollar figure and the per-project split are estimates and say so.

  • How do I know how many tokens I have left? Subscriptions have no balance: providers meter rolling windows. The footer panel shows the percentage used per window and the reset time, and the session badge shows what predicts the wall.

  • Why is cache hit rate important? Cache reads are about ten times cheaper than fresh input. A low rate usually means the start of the prompt changes too often; the tips explain how to stabilise it.

  • Does it work for Codex, Grok, Cursor, OpenCode? Quota bars: yes for every CLI whose usage can be read (Claude, Codex, Grok, Kimi, Antigravity, OpenCode Go, Z.AI Coding Plan through OpenCode). Session info: Claude, Codex and OpenCode.

  • My OpenCode agent stayed at 0 tokens / $0.00. Update to 1.184.0: the figures are now pushed by the AgentsRoom plugin inside OpenCode. They still stay empty for an OpenCode agent launched from the phone, and on an OpenCode 2 build without --standalone support.

  • Where is the OpenCode Go bar? It appears once the OpenCode CLI holds a Go key (run /connect inside OpenCode). Without one, the provider has no section: nothing is read, nothing is shown.

  • Does anything leave my machine? No. Both meters read local files; the quota panel asks the provider's own usage endpoint with the account's credentials.

  • Can the footer show two accounts at once? Yes. Pin them from their header in the Usage panel: each pinned account gets its own gauge, side by side or in one compact pill that lists them on hover. The pin on a bar chooses the window, the pin on an account header chooses the account.

  • I have both OpenCode Go and the Z.AI Coding Plan, which one does the footer show? The plan of the OpenCode agent you are working with. Each plan has its own block in the panel; pin one from its header to keep it in the footer.

  • My Grok gauge shows nothing, or "unavailable". x.ai sometimes returns the billing period without a percentage (free accounts, or right after the weekly reset). AgentsRoom then shows no figure rather than 0 % or last week's number; the bar comes back at the next reading that carries one.

  • Where did the buttons of the Usage panel go? Since 2026-09-25 the gauges fill the left column and every action (temporary model change, quota management, per-project split, optimisation tips, Robin Hood) sits in the right column.

  • Can I be warned before a limit? Yes, every bar has a bell with 50 %, 75 % and 90 % thresholds by default, see Usage Alerts.

  • Am I spending my week too fast? Look at the tick on the weekly bar: left of it you are within budget. The line under the bar gives the gap in points; hover it for your average per day and the projection at the reset.

  • How much of my weekly limit did I use each day? Hover the pace tick or the pace line under a weekly bar of the Usage panel: the Day by day chart shows each day of the current window. On the phone, tap the bar in Activity > Usage. Days are recorded by the desktop from the moment it first reads the gauge (no history before that), and a day the desktop was closed is counted on the next day it reads the gauge. Agents get the same days from usage_overview (dailyUsage).

  • I only work on weekdays, the marker says I am over. Set your work days in Settings > AI providers & accounts > Quota pace: work days (or Set work days from the pace card): with Monday to Friday, each work day unlocks 20 % and the weekend unlocks nothing. You can set different days per account.

  • Usage Alerts: the bell on each bar, a notification when a threshold is crossed.
  • Multiple Accounts: one usage section per signed-in account, and the accounts you can pin in the status bar.
  • Quota Rules: the Quota management block of the same panel.
  • Account Auto-Switch: moving running agents to another account, now a quota rule.
  • Adaptive Mode: a cheaper model when the best one is not needed.
  • Context Canary: what happens when a large context starts to hurt.
  • Project Statistics: time, prompts and cost per project.
  • Robin Hood: what one session costs of your week, opened from Optimize your usage.