Skip to content

Feature request: Expose rate limit usage in statusLine JSON input #18519

Closed

Description

@pjz

Feature Request

Add rate limit usage information to the JSON input provided to custom statusLine commands.

Current Behavior

The statusLine JSON input includes context window usage (context_window.current_usage), which tracks tokens used in the current conversation. However, it does not include rate limit quota information.

Desired Behavior

Include rate limit data in the statusLine JSON, such as:

  • Current usage percentage (e.g., 99%)
  • Time until reset
  • Tokens used / tokens allowed in the current window

Example addition to the JSON:

{
  "rate_limit": {
    "usage_percent": 99,
    "tokens_used": 450000,
    "tokens_limit": 500000,
    "resets_at": "2026-01-16T20:00:00Z"
  }
}

Use Case

Users want to display their rate limit status in the statusline to know when they're approaching their quota limit. Currently, the CLI shows warnings like "You've hit your limit · resets 3pm" but this information isn't available to custom statusline scripts.

The context window percentage (how full the current conversation is) is useful but serves a different purpose than the rate limit (how much API quota remains). Both are valuable to monitor.

Environment

  • Claude Code CLI
  • Custom statusLine command configured in settings.json

Activity

  1. github-actions commented on Jan 16, 2026

    @github-actions

    Found 3 possible duplicate issues:

    1. Add rate limit information to statusline data #18162
    2. [FEATURE] Expose rate limit/session usage data to statusLine configuration #18121
    3. [FEATURE] Add rate limit percentage to statusLine JSON data #18252

    This issue will be automatically closed as a duplicate in 3 days.

    • If your issue is a duplicate, please close it and 👍 the existing issue instead
    • To prevent auto-closure, add a comment or 👎 this comment

    🤖 Generated with Claude Code

  2. pjz commented on Jan 16, 2026

    @pjz
    Author

    whoops, dup as mentioned.

  3. github-actions commented on Jan 24, 2026

    @github-actions

    This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.

  4. locked as resolved and limited conversation to collaborators on Jan 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions