Feature Request: Expose usage quota in status line JSON
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_idmodelinfocontext_windowtokenscostdata
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
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
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.
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.
please implement this! :(
This is a duplicate of #18121, which was fixed as of version 2.1.80.
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.