[FEATURE] Expose Claude.ai plan usage in statusLine JSON payload

Resolved 💬 6 comments Opened Feb 1, 2026 by palonsorodriguez Closed Apr 24, 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

When using Claude Code with a Claude Pro/Max subscription, there's no way to monitor plan usage limits without manually visiting https://claude.ai/settings/usage in a browser. This leads to unexpected rate limiting mid-session.

I use a custom statusLine hook to display context window usage, but I cannot display plan usage because that data isn't available in the JSON payload passed to the hook.

Attempts to scrape the data from claude.ai are blocked by Cloudflare (headless browsers, curl, even visible automated browsers get stuck in verification loops).

Proposed Solution

Add plan_usage to the JSON payload passed to custom statusLine commands:

{
  "context_window": { "used": 72, "total": 100 },
  "plan_usage": { "used_percent": 64, "resets_in": "2h15m" }
}

This would allow custom status lines to display:

Opus 4.5 │ my-project ███████░░░ 72% │ ██████░░░░ 64% ⏱ 2h15m
          ↑ model      ↑ context window  ↑ plan usage  ↑ resets in

Alternative Solutions

  • Scraping claude.ai - Blocked by Cloudflare bot protection
  • Using API rate limit headers - Only shows rate limits, not subscription quota
  • Manually checking the website - Breaks workflow, defeats the purpose

Priority

High - Significant impact on productivity

Unexpected rate limiting mid-session disrupts work and wastes context.

Feature Category

Configuration and settings (statusLine hook payload)

Use Case Example

  1. I start a Claude Code session for a complex refactoring task
  2. My custom statusLine shows context window at 45%
  3. I'd also see plan usage at 78% with "1h 30m" until reset
  4. I know I should wrap up soon or wait for reset before starting another big task
  5. This prevents surprise rate limiting mid-task

Additional Context

Scope: This applies only to subscription-based accounts (Claude Pro/Max). API accounts (pay-as-you-go) have no usage cap to display.

Current statusLine config example:

{
  "statusLine": {
    "type": "command",
    "command": "node \"/path/to/custom-statusline.js\""
  }
}

The hook already receives context_window data - this request is to add plan_usage alongside it.

View original on GitHub ↗

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