Docs

How it works

QuotaLens reads the authoritative limits your tools already enforce. No scraping, no guessing — here is exactly where each number comes from.

The data sources

SourceReadsNetwork
Claude live quotaanthropic-ratelimit-unified-* response headers, per tokenone max_tokens: 1 request per account, ≤ once / 5 min
Codex live quotaofficial rate_limits in ~/.codex/sessions/**/*.jsonlnone
Statisticstoken / cost from local Claude & Codex JSONL logsnone

Claude — a tiny throttled probe

Claude does not expose a usage endpoint, but every API response carries anthropic-ratelimit-unified-* headers describing your current 5-hour and 7-day position. QuotaLens makes the smallest possible request to read them — max_tokens: 1 — using each account’s own setup-token, and never more than once every five minutes per account. The numbers you see are the ones Anthropic itself returns, not an estimate.

Codex — read straight from disk

Codex writes its session rollout files to ~/.codex/sessions/**/*.jsonl, and those files include the official rate_limits block. QuotaLens parses them locally and incrementally, so there is no network call at all for Codex.

The 5-hour and 7-day windows

Both tools enforce a short rolling window and a longer weekly one. The menu-bar ring always shows your highest active window across every source, so the most urgent number is the one you see first. The 5-hour window can be read as a resetting block or a sliding sum — see Settings reference.