Expose rate limit utilization data in statusline JSON

Resolved 💬 2 comments Opened Feb 27, 2026 by kryvel Closed Feb 27, 2026

Feature Request

Expose subscription rate limit data (utilization, resetsAt, rateLimitType) in the statusline JSON payload, so users can display their daily/weekly usage limits in the status line.

Context

Claude Code already parses these values from API response headers internally:

  • anthropic-ratelimit-unified-7d-utilization — weekly usage percentage
  • anthropic-ratelimit-unified-7d-reset — weekly reset timestamp
  • anthropic-ratelimit-unified-5h-utilization — session usage percentage
  • anthropic-ratelimit-unified-5h-reset — session reset timestamp
  • anthropic-ratelimit-unified-status — current limit status
  • anthropic-ratelimit-unified-fallback — overage availability

This data powers the /usage command UI and the internal limit warnings. However, it is not included in the JSON payload sent to the statusline command via stdin.

Current statusline JSON fields

The statusline receives cost.* (session cost, duration) and context_window.* (tokens, used percentage), but nothing about subscription rate limits.

Proposed addition

Add a rate_limit (or usage_limits) object to the statusline JSON:

{
  "rate_limit": {
    "status": "allowed" | "allowed_warning" | "rejected",
    "type": "seven_day" | "five_hour" | "seven_day_opus" | "seven_day_sonnet",
    "utilization": 0.42,
    "resets_at": 1772500000,
    "overage_available": true,
    "is_using_overage": false
  }
}

Use case

Users want to see how much of their weekly/daily limit is consumed directly in the status line, without running /usage manually. Example output:

user@host ~/project on main | $1.23 | ctx 34% | week 42% (resets 3d)

This is especially useful for Max subscribers who want to pace their usage.

View original on GitHub ↗

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