Expose token window expiration/rate limit reset time in statusline data

Resolved 💬 3 comments Opened Feb 20, 2026 by tamirgmail Closed Feb 24, 2026

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 /status each time — breaks flow and requires leaving the current task
  • No current workaround exists for surfacing this data in the statusline

View original on GitHub ↗

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