claude-code - 💡(How to fix) Fix Status line: expose monthly usage/limit data

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

The Claude Code status line currently exposes session-level cost (cost.total_cost_usd) and rolling-window rate limits (rate_limits.five_hour, rate_limits.seven_day), but there is no way to display a user's monthly account usage against their plan limit — the same figure shown at claude.ai/settings/usage.

Root Cause

A concrete example: a user had a status line showing ~$6 spent for the month, but the account settings page showed 29% of their monthly limit already used — because the two metrics measure entirely different things.

Fix Action

Fix / Workaround

Current Workaround

Code Example

{
  "usage": {
    "monthly_limit_percent_used": 29,
    "monthly_limit_usd": 100.00,
    "monthly_spent_usd": 29.00
  }
}

---

claude-sonnet-4-6 | ctx: 12% | $0.43 | monthly: 29%
RAW_BUFFERClick to expand / collapse

Feature Request

Summary

The Claude Code status line currently exposes session-level cost (cost.total_cost_usd) and rolling-window rate limits (rate_limits.five_hour, rate_limits.seven_day), but there is no way to display a user's monthly account usage against their plan limit — the same figure shown at claude.ai/settings/usage.

Motivation

Users on Max/Pro plans have a monthly usage cap. The only way to check progress against that limit today is to visit the web UI manually. This leads to surprise limit exhaustion mid-session, as the session-level cost figure in the status line measures something different (estimated token cost) and does not reflect actual account quota consumption.

A concrete example: a user had a status line showing ~$6 spent for the month, but the account settings page showed 29% of their monthly limit already used — because the two metrics measure entirely different things.

Proposed Solution

Expose monthly usage data in the status line hook payload, for example:

{
  "usage": {
    "monthly_limit_percent_used": 29,
    "monthly_limit_usd": 100.00,
    "monthly_spent_usd": 29.00
  }
}

Claude Code already authenticates with claude.ai on the user's behalf. The data is available via the internal API (e.g. claude.ai/api/organizations/{org_id}/overage_spend_limit). Surfacing it through the status line hook would allow users to build status line components like:

claude-sonnet-4-6 | ctx: 12% | $0.43 | monthly: 29%

Current Workaround

None viable for SSO/OAuth users. The OAuth token is not stored locally in a form that a status line shell script can reuse, so users cannot independently call the API from a custom status line command.

Additional Context

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING