QuotaLens

Questions

QuotaLens, the claude.ai usage page, and claude /usage

Three surfaces for one account. The usage page shows where the limits stand now; claude /usage adds what recent Claude Code sessions on this machine spent it on; QuotaLens keeps the history and forecasts the reset. The claude /usage column is from Anthropic's Claude Code documentation on 8 September 2026; a cell it does not settle says "not documented".

QuotaLensThe claude.ai usage pageclaude /usage
What it measuresClaude Pro and Max subscription quota: the five-hour session window and the weekly limits, as your account reports themSession and weekly usage percentages for your accountPlan usage bars and activity stats, plus a breakdown of recent Claude Code usage by skill, subagent, plugin and MCP server, over the last 24 hours or 7 days
Where the data comes fromYour claude.ai session cookie, kept in the OS keychain, read from undocumented endpoints (the Terms row above)Your signed-in sessionClaude Code: the plan bars from a request to the usage endpoint, the breakdown from session history on this machine, so other devices and claude.ai are not included
History persistsYes: every reading in a SQLite file you own, session windows kept for two yearsNo: the current reading onlyThe breakdown covers the last 24 hours or 7 days of this machine's sessions; a longer record is not documented
Burn-rate forecastYes: points per hour, and whether this session runs out before the resetNonot documented
Weekly budget viewYes: full five-hour sessions left, at your own measured cost per sessionYes: weekly percentagesPlan usage bars; which limits they show is not documented
AlertsWebhook on a burn-rate threshold; desktop notifications, off by defaultnot documentednot documented
ExportCSV, JSON, and a Prometheus /metrics endpointnot documentednot documented
Where it runsYour machine, on 127.0.0.1: macOS, Linux, Windows; Python 3.11+claude.ai, in the browserInside a Claude Code session in the terminal, or the VS Code extension's Account and usage dialog
LicenceMITpart of the Claude servicepart of Claude Code

Common questions

Is this allowed under Anthropic's terms?

Anthropic's Consumer Terms, section 3(7), prohibit automated access except through an API key, and a subscription cookie is not an API key. There is no carve-out for reading your own usage. QuotaLens only observes: it never sends a prompt and cannot raise, bypass, or extend a limit. Running it is your decision, and the risk is yours.

Does QuotaLens work with Claude Code?

Yes, in the sense that matters: Claude Code, Claude Desktop and claude.ai draw on one pooled quota, and QuotaLens reads that pool, so a Claude Code session moves the same numbers. It does not read Claude Code's own credentials, and it cannot attribute usage to a project or tool; Claude Code's /usage command does that.

What happens when the session cookie expires?

When claude.ai signs you out or the cookie expires, the dashboard shows an auth state instead of a stale number, because a page that cannot read your account must never look like a healthy one. Run quotalens auth again, paste the current cookie, and polling resumes. The cookie is checked with one request before it is stored.

How is this different from the usage page on claude.ai?

The usage page shows one number, right now, and forgets it when you close the tab. QuotaLens polls the same account every minute and keeps every reading in a SQLite file you own, so it can show the burn rate, project whether this session runs out before the reset, express the week in full sessions, and keep every past window.