Expose rate limit usage data in statusline JSON payload

Resolved 💬 2 comments Opened Mar 8, 2026 by cenoroid Closed Mar 8, 2026

Summary

The statusline script receives a JSON payload on stdin with model, context_window, cost, and workspace data. However, the 5-hour session usage and weekly usage percentages (visible in the /config dialog) are not included in this payload.

Request

Add rate limit usage fields to the statusline JSON, e.g.:

{
  "rate_limit": {
    "session_used_percentage": 42,
    "session_remaining_percentage": 58,
    "weekly_used_percentage": 17,
    "weekly_remaining_percentage": 83
  }
}

Why

This data already exists in-memory (parsed from API response headers like x-ratelimit-*) and is displayed in /config. It just needs to be added to the JSON object passed to the statusline script's stdin.

For Max/Pro subscribers, knowing how much of their rate limit window they've consumed is more useful than dollar cost. Currently there's no way to surface this in the statusline.

Current workaround

None. The data is not written to disk or exposed via any local API. The only way to check is opening /config manually.

View original on GitHub ↗

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