claude-code icon indicating copy to clipboard operation
claude-code copied to clipboard

Feature Request: Expose usage quota in status line JSON

Open idStar-bot opened this issue 11 months ago • 2 comments

Summary

Please expose Claude Max usage quota information in the JSON data sent to custom status line commands.

Current Behavior

The status line JSON includes useful data like:

  • session_id
  • model info
  • context_window tokens
  • cost data

But it does not include the Claude Max usage quota (percentage used in current window, reset time).

Requested Behavior

Add fields to the status line JSON like:

{
  "usage_quota": {
    "percentage_used": 13,
    "reset_time": "2025-12-30T19:00:00Z",
    "plan": "max"
  }
}

Use Case

Users with custom status lines want to see their usage quota at a glance without running /usage manually. This would enable status lines like:

project (main) [Opus 4.5] [Max] [13% · resets 7pm] [████░░░░░░ 85%] 04:30:15

Workaround Attempted

Currently there's no way to get this info programmatically - it's only available via the /usage slash command which can't be invoked from hooks or scripts.


🤖 Generated with Claude Code

idStar-bot avatar Dec 30 '25 21:12 idStar-bot

Big +1 for this one. I just created a macOS menubar app (https://github.com/wesm/vibepulse) that displays token analytics for Claude Code, and I would like to programmatically access usage limits so that this could be displayed as an alternative. Codex allows me to obtain the usage limits programmatically but Claude Code does not

wesm avatar Jan 01 '26 14:01 wesm

Another big +1, it's rather disappointing to have a "You're at 97% usage limit" warning sneak up on you with hours to go before the next reset. A programmatic way to check is the most flexible (you could script something), statusline would also be nice, or a customizable threshold (e.g. 70% instead), perhaps involving the amount of time remaining (i.e. you're outpacing the reset timer). If I'm going too fast, I might switch to Sonnet for a time, etc.

amterp avatar Jan 04 '26 11:01 amterp

This issue has been inactive for 30 days. If the issue is still occurring, please comment to let us know. Otherwise, this issue will be automatically closed in 30 days for housekeeping purposes.

github-actions[bot] avatar Feb 05 '26 10:02 github-actions[bot]

please implement this! :(

mrtomatwo avatar Mar 18 '26 14:03 mrtomatwo

This is a duplicate of #18121, which was fixed as of version 2.1.80.

claude[bot] avatar Apr 26 '26 14:04 claude[bot]

This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.

github-actions[bot] avatar May 04 '26 15:05 github-actions[bot]