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
  • /usage in that session then fails with rate_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

  1. A simple REST API endpoint to query usage (e.g., GET /api/usage with existing auth)
  2. Or a CLI flag like claude --usage --json that outputs usage data non-interactively
  3. At minimum, separate /usage from session startup rate limits

Environment

  • Claude Code v2.1.74, macOS, Claude Max subscriber

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗