Expose token window expiration/rate limit reset time in statusline data
Feature Request
Summary
Expose the token window expiration time (visible in /status → Usage tab) as a field in the JSON data passed to the statusline script via stdin.
Motivation
The /status usage tab shows when the current token window expires/resets, which is useful for understanding rate limits and planning usage. However, this information is not included in the data payload that Claude Code sends to custom statusline scripts.
Users who customize their statusline (via ~/.claude/statusline.js) can currently display:
- Context window usage percentages
- Total input/output tokens
- Cache breakdown (creation/read tokens)
- Session cost and duration
- Model info
But they cannot display:
- Token window expiration/reset time
- Rate limit status or reset timing
Proposed Solution
Add a new field to the statusline JSON payload, e.g.:
{
"rate_limit": {
"token_window_expires_at": "2026-02-20T15:30:00Z",
"tokens_remaining": 500000,
"requests_remaining": 45
}
}
This would allow statusline scripts to show countdown timers or expiration info, giving users at-a-glance visibility into their rate limit status without needing to open /status.
Alternatives Considered
- Manually checking
/statuseach time — breaks flow and requires leaving the current task - No current workaround exists for surfacing this data in the statusline
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗