claude-code - 💡(How to fix) Fix Expose "extra usage" balance and spend in statusline JSON input [1 comments, 2 participants]

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…
GitHub stats
anthropics/claude-code#50847Fetched 2026-04-20 12:11:25
View on GitHub
Comments
1
Participants
2
Timeline
4
Reactions
0
Author
Participants
Timeline (top)
labeled ×3commented ×1

Code Example

{
  "extra_usage": {
    "enabled": true,
    "spent_usd": 8.37,
    "monthly_limit_usd": 50.00,
    "used_percentage": 16.74,
    "balance_usd": 11.62,
    "resets_at": "2026-05-01T00:00:00Z",
    "auto_reload_enabled": false
  }
}
RAW_BUFFERClick to expand / collapse

Feature request

Claude.ai Max subscribers can enable "extra usage" — a prepaid pool (with a monthly spend limit) that acts as overage when 5h/7d rate limits are hit. This is visible on claude.ai Settings → Usage:

  • Monthly spend limit (e.g. $50)
  • Amount spent this period (e.g. $8.37 — 17% used)
  • Current balance (e.g. $11.62)
  • Reset date (e.g. "Resets May 1")
  • On/off toggle state
  • Auto-reload state

None of this is exposed in the JSON input sent to statusline scripts. rate_limits.five_hour and rate_limits.seven_day are there, but the extra-usage pool is invisible from Claude Code.

Use case

I'd like to see in the statusline how much extra usage I've spent this month (or how much of the spend limit remains) without having to switch to the browser. This is especially relevant for users who work long sessions and regularly hit rate limits — the pool exists to prevent interruptions, but budgeting against it is hard when the balance isn't visible.

Proposed fields

{
  "extra_usage": {
    "enabled": true,
    "spent_usd": 8.37,
    "monthly_limit_usd": 50.00,
    "used_percentage": 16.74,
    "balance_usd": 11.62,
    "resets_at": "2026-05-01T00:00:00Z",
    "auto_reload_enabled": false
  }
}

(Names are suggestions — any stable schema works.)

Alternatives considered

  • Polling the claude.ai dashboard — requires session cookies, no public API, fragile.
  • Manual check in browser — defeats the purpose of statusline awareness.

extent analysis

TL;DR

To address the feature request, the extra_usage information should be added to the JSON input sent to statusline scripts, allowing users to track their extra usage spend and remaining balance.

Guidance

  • The proposed fields in the extra_usage object seem to cover the necessary information, including spent_usd, monthly_limit_usd, used_percentage, balance_usd, resets_at, and auto_reload_enabled.
  • To implement this, the backend would need to be updated to include these fields in the JSON output for statusline scripts.
  • The schema for the extra_usage object should be stable to ensure compatibility with existing scripts and tools.
  • Consider adding documentation for the new fields to help developers understand their usage and formatting.

Example

{
  "rate_limits": {
    "five_hour": {...},
    "seven_day": {...}
  },
  "extra_usage": {
    "enabled": true,
    "spent_usd": 8.37,
    "monthly_limit_usd": 50.00,
    "used_percentage": 16.74,
    "balance_usd": 11.62,
    "resets_at": "2026-05-01T00:00:00Z",
    "auto_reload_enabled": false
  }
}

Notes

The implementation details may vary depending on the specific backend technology and architecture used by Claude.ai. Additionally, ensuring the security and accuracy of the extra_usage data is crucial to prevent potential issues or exploits.

Recommendation

Apply workaround by adding the proposed extra_usage fields to the JSON input, as this will provide the necessary information for statusline scripts to display the extra usage spend and remaining balance.

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