Feature request: OAuth subscription usage tracking in statusline
Summary
Add OAuth subscription usage data to the statusline JSON payload (and/or expose a queryable endpoint), so users can track their weekly/monthly usage directly in the Claude Code statusline.
Motivation
Claude Code already supports a custom statusLine command that receives a JSON payload with session-level data (model, context window usage, effort level). This is great for per-session awareness, but there's currently no way to surface cumulative subscription usage — e.g. how many tokens or requests have been used this week against a Pro/Max/Team plan.
For users on capped plans, knowing how much of their allocation remains is directly relevant while working.
Proposed solution
Either:
- Include subscription usage in the statusline JSON payload — add a field like:
``json`
{
"subscription": {
"used_tokens": 1200000,
"limit_tokens": 5000000,
"period": "weekly",
"resets_at": "2026-03-21T00:00:00Z"
}
}
Usage: 24%` to their statusline with a simple script change.
This would let users add something like
- Expose a
/usageAPI endpoint for OAuth users — a lightweight authenticated endpoint returning current period usage, so it can be queried by tools like the statusline script.
Example statusline output
myproject | main | Sonnet 4.6 | Medium | Context: ████░░ 18% | Usage: 24%
Notes
- This is especially valuable for Pro/Max subscribers who have weekly usage limits
- No sensitive billing data is needed — just usage % or tokens used/remaining for the current period
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗