[FEATURE] Expose API Rate Limits to Status Line

Resolved 💬 3 comments Opened Jan 29, 2026 by pravinzobaze Closed Jan 29, 2026

Preflight Checklist

  • [x] I have searched existing requests and this feature hasn't been requested yet
  • [x] This is a single feature request (not multiple features)

Problem Statement

Feature Request: Expose API Rate Limits to Status Line

Summary

Add API rate limit information (5-hour and weekly limits) to the JSON data provided to the statusLine command, allowing users to monitor their usage in real-time.

Motivation

Users want to track their API usage limits directly in the status line to:

  • Monitor how close they are to hitting their 5-hour request limit
  • Track weekly usage to better plan their work
  • Avoid unexpected interruptions when limits are reached
  • Make informed decisions about resource-intensive operations

Currently, the status line can only show context window usage, but not the broader API rate limits that affect overall usage.

Proposed Solution

Proposed Solution

Enhance the JSON input provided to the statusLine command to include API limit information:

{
  "session": { ... },
  "workspace": { ... },
  "model": { ... },
  "context_window": { ... },
  "api_limits": {
    "five_hour_limit": {
      "used": 120,
      "total": 300,
      "remaining": 180,
      "reset_time": "2026-01-29T18:30:00Z",
      "used_percentage": 40
    },
    "weekly_limit": {
      "used": 500,
      "total": 1000,
      "remaining": 500,
      "reset_time": "2026-02-02T00:00:00Z",
      "used_percentage": 50
    }
  }
}

Alternative Solutions

Alternative Approaches

If real-time API limit tracking isn't feasible, consider:

  1. Adding a CLI command like claude limits to check current usage
  2. Periodic notifications when approaching limits (e.g., at 70%, 85%, 95%)
  3. Display limits in the web dashboard with a link in the CLI

Additional Context

  • This request stems from users wanting more visibility into their API usage
  • The status line infrastructure already supports dynamic data display
  • Similar features exist in other CLI tools (e.g., cloud provider CLIs showing quota usage)

Priority

Medium - Would be very helpful

Feature Category

Interactive mode (TUI)

Use Case Example

Use Cases

Example Status Line Display

Users could configure their status line to show:

➜ project | main ✗ | Sonnet 4.5 | ctx: 53% | 5h: 120/300 | weekly: 500/1000

Benefits

  1. Proactive Planning: Users can see when they're approaching limits before being blocked
  2. Better Resource Management: Make informed decisions about starting long-running tasks
  3. Transparency: Clear visibility into usage patterns
  4. Customization: Users can style and format limit display to their preferences

Additional Context

_No response_

View original on GitHub ↗

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