No programmatic way to check usage - /usage rate limits paying Max subscribers
Resolved 💬 3 comments Opened Mar 13, 2026 by nickaccent Closed Mar 13, 2026
Problem
There is no programmatic way for Claude Code users to check their usage (session %, weekly %, reset times). The only option is manually typing /usage in an interactive terminal session.
Why this matters
As a paying Max subscriber (£150+/month), I built a macOS menu bar app to display my usage stats. This requires spawning a Claude Code session in a PTY via expect, sending /usage, and parsing raw TUI output with ANSI escape codes. This is fragile, hacky, and shouldn't be necessary.
Rate limiting makes it worse
The /usage command shares rate limits with session startup API calls:
- Spawning a new Claude session consumes rate limit budget
/usagein that session then fails withrate_limit_error- The rate limit affects all terminals on the account - not just the one that triggered it
- Recovery takes approximately 1 hour
The act of trying to monitor your own usage prevents you from checking your usage.
Request
- A simple REST API endpoint to query usage (e.g.,
GET /api/usagewith existing auth) - Or a CLI flag like
claude --usage --jsonthat outputs usage data non-interactively - At minimum, separate
/usagefrom session startup rate limits
Environment
- Claude Code v2.1.74, macOS, Claude Max subscriber
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗