Expose session rate limit usage and reset time in statusLine JSON input
Feature Request
Problem
The statusLine command receives JSON input via stdin with useful fields like context_window.used_percentage, cost, workspace, etc. However, it does not include session rate limit usage or reset time — the same info shown by the /usage command.
Users who want to display their rate limit status (session usage % and time until reset) in the status bar currently cannot do so because this data isn't available in the statusline JSON input.
Current statusLine JSON fields (example)
{
"session_id": "...",
"model": { "id": "claude-opus-4-6", "display_name": "Opus 4.6" },
"workspace": { "current_dir": "..." },
"cost": { "total_cost_usd": 0.80 },
"context_window": {
"used_percentage": 12,
"remaining_percentage": 88,
"context_window_size": 200000
}
}
Requested addition
Please include session/rate limit information in the statusLine JSON input, for example:
{
"rate_limit": {
"used_percentage": 45,
"remaining_percentage": 55,
"reset_time_iso": "2026-02-07T15:30:00Z",
"reset_in_seconds": 7200
}
}
Use case
This would allow users to build custom status bars that show at a glance:
- How much of their session rate limit has been used
- When the rate limit will reset
- Combined with context window usage, giving full visibility into session health
Currently, the only way to check this is by manually running /usage, which interrupts workflow.
Environment
- Claude Code version: 2.1.34
- Plan: Pro
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗