Feature Request: Include rate limit info in statusline data

Resolved 💬 3 comments Opened Feb 1, 2026 by mhit3526 Closed Feb 5, 2026

Summary

Please include Anthropic API rate limit information in the data passed to the custom statusline script.

Background

The Anthropic API returns rate limit information in response headers:

  • anthropic-ratelimit-tokens-limit
  • anthropic-ratelimit-tokens-remaining
  • anthropic-ratelimit-tokens-reset
  • anthropic-ratelimit-requests-limit
  • anthropic-ratelimit-requests-remaining
  • anthropic-ratelimit-requests-reset

Currently, Claude Code's statusline data includes cost and context window information, but not rate limit details.

Use Case

When running multiple Claude Code workers in parallel, users can quickly approach rate limits without warning. Having access to rate limit data in the statusline would allow users to:

  1. Display remaining tokens/requests in their status bar
  2. Implement custom alerts before hitting limits
  3. Make informed decisions about parallelization

Proposed Solution

Include the rate limit header values in the JSON passed to statusline.sh:

{
  "rate_limit": {
    "tokens_limit": 100000,
    "tokens_remaining": 85000,
    "tokens_reset": "2024-01-15T10:30:00Z",
    "requests_limit": 1000,
    "requests_remaining": 950,
    "requests_reset": "2024-01-15T10:30:00Z"
  },
  // ... existing fields
}

Thank you for considering this feature!

View original on GitHub ↗

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