Expose plan usage limits in statusline JSON input

Status Fixed / completed
Maintainer reply None cached
Activity 7 comments · opened Feb 14, 2026 · closed Feb 17, 2026

Feature Request

Add account-level plan usage data to the JSON input that gets piped to the statusline command script.

What I'd like

Two new fields in the statusline JSON:

{
  "plan_usage": {
    "used_percentage": 14,
    "resets_in_seconds": 14340
  }
}

This matches the data already shown on claude.ai → Settings → Usage ("Current session: X% used, Resets in Y hr Z min").

Why

The statusline already exposes session-level context window usage (context_window.used_percentage), but there's no way to see account-level rate limit status without leaving the CLI to check the web UI. Having both metrics side-by-side in the statusline would help users pace their usage and avoid unexpected rate limits.

Current workaround

None — the data isn't available via any API endpoint, CLI command, or programmatic access method.

View original on GitHub ↗

7 Comments

github-actions[bot] · 6 months ago

Found 3 possible duplicate issues:

  1. https://github.com/anthropics/claude-code/issues/25041
  2. https://github.com/anthropics/claude-code/issues/25420
  3. https://github.com/anthropics/claude-code/issues/25178

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

naga12dev · 6 months ago

This is present in /status

<img width="529" height="324" alt="Image" src="https://github.com/user-attachments/assets/90a16f00-8d4d-4ac8-9e65-6cb42b67c019" />

christo8989 · 6 months ago

@naga12dev We already know this. We want it to be possible to add it to the statusline.

christo8989 · 6 months ago

My recommendation is to follow the existing api interface for usage. Well, some subset of the existing interface.

{
  "plan_usage": {
      "five_hour": {
          "utilization": 58.0,
          "resets_at": "2026-02-15T01:00:00.812113+00:00"
      },
      "seven_day": {
          "utilization": 7.0,
          "resets_at": "2026-02-21T20:00:00.812137+00:00"
      },
      "seven_day_oauth_apps": null,
      "seven_day_opus": null,
      "seven_day_sonnet": null,
      "seven_day_cowork": null,
      "iguana_necktie": null,
      "extra_usage": null
  }
}
BareTread · 6 months ago

+1 — plan usage limits in the statusline JSON would be incredibly useful. Currently flying blind between /usage checks. The statusline hook already gets called on every interaction — adding quota fields to the payload would be zero-friction for both users and the implementation.

milanorszagh · 6 months ago

Closing as duplicate of #25041, which is the most comprehensive version of this request. Thumbs-up'd that issue instead.

github-actions[bot] · 6 months ago

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.