Expose session/weekly rate limit usage in statusline JSON

Resolved 💬 5 comments Opened Mar 15, 2026 by BuntBaum Closed Apr 27, 2026

Feature Request

Problem

The /usage command shows valuable rate limit data:

  • Current session: X% used
  • Current week (all models): X% used

However, this data is not available in the statusline JSON that custom statusline scripts receive. This makes it impossible to display rate limit usage in custom status lines.

Current statusline JSON fields

The context_window object provides context window usage (tokens, percentage), but no rate limit / quota data:

{
  "context_window": {
    "total_input_tokens": 5619,
    "total_output_tokens": 10377,
    "context_window_size": 1000000,
    "used_percentage": 4,
    "remaining_percentage": 96
  }
}

Proposed addition

Add a rate_limits (or usage) object to the statusline JSON:

{
  "rate_limits": {
    "session_usage_percentage": 29,
    "session_resets_at": "2026-03-15T23:00:00+01:00",
    "weekly_usage_percentage": 14,
    "weekly_resets_at": "2026-03-21T18:00:00+01:00"
  }
}

Use case

Users with custom statusline scripts (via statusLine setting) want to monitor their rate limit usage at a glance without running /usage manually. Example desired output:

claude-opus-4-6[1m] · ctx:3% sess:29% week:14%

Environment

  • Claude Code 2.1.76
  • macOS (darwin arm64)

View original on GitHub ↗

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