[FEATURE] /statusline hook JSON missing Sonnet-only weekly 'rate limit for Claude Max plan

Resolved 💬 3 comments Opened May 24, 2026 by sriv95 Closed Jun 15, 2026

Preflight Checklist

  • [x] I have searched existing requests and this feature hasn't been requested yet
  • [x] This is a single feature request (not multiple features)

Problem Statement

The statusLine command hook receives a rate_limits JSON object, but it only exposes two fields — five_hour and seven_day — even for users on the Claude Max plan. Claude Max includes a separate Sonnet-only weekly usage limit (visible in the Claude Web UI), but this data is not passed to the statusLine hook, making it impossible to surface in a custom status line.

Example of current rate_limits payload received by the hook:
"rate_limits": {
"five_hour": { "used_percentage": 22, "resets_at": 1779666600 },
"seven_day": { "used_percentage": 16, "resets_at": 1780012800 }
}

Proposed Solution

Add a sonnet_seven_day (or similarly named) field to the rate_limits object when the user is on Claude Max, mirroring the structure of existing fields:

"rate_limits": {
"five_hour": { "used_percentage": 22, "resets_at": 1779666600 },
"seven_day": { "used_percentage": 16, "resets_at": 1780012800 },
"sonnet_seven_day": { "used_percentage": 24, "resets_at": 1780012800 }
}

The field should only appear when the user's plan includes a Sonnet-specific weekly cap (e.g., Claude Max), so existing scripts can conditionally display it without breaking for other plans.

Alternative Solutions

  1. Expose a separate plan field in the hook JSON that include the user's current plan (e.g., "plan": "max") so scripts can conditionally show plan-specific UI, even if limit data isn't available yet.
  2. Add a dedicated /status or /limits CLI command that a Claude limits command that prints current usage for all rate limits (including Sonnet-only weekly ones) in JSON or human-readable format, usable independently of the statusline hook.
  3. Document all available rate_limits fields per plan. if the fields already exist but are undocumented, publishing the full schema would allow the community to build correct status line scripts without guessing field names.

Priority

Medium - Would be very helpful

Feature Category

API and model interactions

Use Case Example

A statusline script that shows all three limits for Max plan users:

5h: 22% | Reset in 3h 40m | Weekly: 16% | Reset in 3d 4h | Sonnet Weekly: 24% | Reset in 3d 4h

This gives Max plan users full visibility into their usage directly in the Claude Code status bar, without needing to switch to the web UI.

/statusline show used percentage usage limit for 5 hr limits and Weekly limits with show Reset in {duration} and if using Claude Max plan then also show Sonnet only weekly limits too.

Additional Context

_No response_

View original on GitHub ↗

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