Skip to content

Feature request: programmatic/scriptable way to check current Pro/Max weekly usage quota #86297

Closed as duplicate

Description

@rizalariadi21

Body:
Is your feature request related to a problem? Please describe.
Right now, the only way to see how much of my weekly Claude Pro/Max usage quota I've used is to check the claude.ai website UI manually. There's no CLI command, flag, or API endpoint that returns this as structured/scriptable data. The /usage slash command in Claude Code shows usage info interactively, but it's meant for reading in the terminal, not for parsing or automation.

Describe the solution you'd like
A scriptable way to fetch current weekly quota usage (e.g. percent used, reset date/time), such as:

  • A claude usage --json CLI flag that outputs the same data /usage shows, in JSON.
  • Or an API endpoint (authenticated with the same session/account used by Claude Code or claude.ai) that returns current usage percentage and next reset timestamp for a Pro/Max subscription.

Describe alternatives you've considered

  • Community tools like ccusage parse local session logs to estimate token usage, but this is only an approximation and doesn't reflect the actual account-level weekly quota tracked by Anthropic.
  • Manually checking the claude.ai website works but can't be automated.

Use case
I'd like to set up a scheduled job that checks my real remaining weekly quota and sends me a notification (e.g. via a chat bot) so I can pace my usage across the week without having to remember to check the website manually.

Activity

  1. caya8205-2 commented on Aug 21, 2026

    @caya8205-2

    +1 on this, same problem here. /usage and stuff like ccusage only add up whatever's in the local session logs, so the moment you use the same account from more than one machine (e.g. laptop + a VPS) the numbers stop matching what's actually left on the account.

    Adding to the JSON/API idea above, an interactive option would help too. Codex CLI's /status just prints the server-reported weekly limit directly, no extra flags needed:

    Weekly limit:   [███████████████████░] 94% left (resets 13:01 on 27 Aug)
    

    Something like that bolted onto Claude Code's existing /status (on top of whatever JSON/scriptable output gets built for automation) would cover both the "just glance at it" case and the automation case in one go.

  2. added
    stale
    on Sep 29, 2026
  3. yagcioglutoprak commented on Oct 1, 2026

    @yagcioglutoprak

    The closest thing to a scriptable source today is the status line: the statusLine JSON includes rate_limits.five_hour and rate_limits.seven_day with used_percentage and resets_at, so a statusLine command can log or forward them. It only runs inside an active session, though, and only after the first API call (see #95711). For the notification and pacing use case, on macOS I built AIQuotaBar (disclosure: I'm the author), a free, open-source menu bar app that shows the Claude 5-hour and weekly limits with reset countdowns, sends threshold alerts, and warns when you're on pace to run out. It isn't a CLI/JSON API, so it doesn't replace what you're asking for, and it's macOS-only: https://github.com/yagcioglutoprak/AIQuotaBar

  4. removed
    stale
    on Oct 1, 2026
  5. bpasero-ant commented on Nov 20, 2026

    @bpasero-ant
    Contributor

    Duplicate of #13585. We're closing this one to keep the discussion in one place. If you disagree, let us know here and we can re-open it. Thanks for reporting!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:cliarea:costenhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions