Original Reddit post

I’m building a small desktop usage widget for my own use (Windows, shows Claude Code and Codex 5h/weekly limits), and I got stuck on which data source is actually allowed. Posting because I can’t find a clear answer anywhere, and it seems to affect every tracker out there. What the docs say now, in Legal and compliance → Authentication and credential use:

  • OAuth is “intended exclusively for purchasers of Claude Free, Pro, Max, Team, and Enterprise subscription plans and is designed to support ordinary use of Claude Code and other native Anthropic applications.”
  • “developers may not collect, store, or intermediate Claude.ai credentials or session tokens.” Read literally, that seems to rule out a third-party app reading the OAuth token from ~/.claude/.credentials.json (or the macOS Keychain) and calling /api/oauth/usage with it, which is what several popular trackers do. Some also ask you to paste a claude setup-token token, and the docs say that one is for CLAUDE_CODE_OAUTH_TOKEN in CI and “can only make model requests”. The alternatives I can see: Statusline rate_limits. Claude Code passes rate_limits.five_hour and rate_limits.seven_day (used_percentage, resets_at) to your statusline command on stdin. Real server numbers, no credentials, no network calls of your own. Downside: it only updates while a session is running, and you can only have one statusline command, so a tool has to chain whatever you already use. Local JSONL session logs (the ccusage approach). Clearly fine to read, but token counts only, so the percentage is an estimate and it can’t see usage from claude.ai , mobile, or another machine. The OAuth token + usage endpoint. Real numbers, but that’s the thing the clause above seems to describe. What I’m asking:
  • Is my read right that (1) and (2) are fine and (3) is not, or does “ordinary use” cover a local read-only tool the user installed for themselves?
  • Has anyone actually seen enforcement here? I’ve seen reports of Third-party apps now draw from your extra usage, not your plan limits 429s, which suggests thirdsomehow.
  • Does the answer change if the tool is paid rather than free and open source? Context on why I care about the last one: the Feb 2026 docs update got walked back on X, but the walk-back was specifically about the Agent SDK and claude -e token. The Help Center’s third-party appallowance is scoped to apps “that authenticate with your Claude subscription through the Agent SDK”, which a usage widget doesn’t. Not asking anyone to rule on my app. I’m afte docs and what’s shipping don’t line up. submitted by /u/Ok-Restaurant5412

Originally posted by u/Ok-Restaurant5412 on r/ClaudeCode