Feature request: OAuth subscription usage tracking in statusline

Resolved 💬 3 comments Opened Mar 14, 2026 by poppinpixels Closed Apr 16, 2026

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:

  1. 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"
}
}
`
This would let users add something like
Usage: 24%` to their statusline with a simple script change.

  1. Expose a /usage API 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

View original on GitHub ↗

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