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
| Source | Reads | Network |
|---|---|---|
| Claude live quota | anthropic-ratelimit-unified-* response headers, per token | one max_tokens: 1 request per account, ≤ once / 5 min |
| Codex live quota | official rate_limits in ~/.codex/sessions/**/*.jsonl | none |
| Statistics | token / cost from local Claude & Codex JSONL logs | none |
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.