Feature Request: Expose Claude.ai plan usage in status line
Summary
When using Claude Code with a Claude Pro/Max subscription, there's no way to monitor plan usage limits without visiting https://claude.ai/settings/usage in a browser. This leads to unexpected rate limiting mid-session.
Feature Request
Expose Claude.ai plan usage data (percentage used and reset time) in the JSON payload passed to custom statusLine hooks, so it can be displayed alongside context window info.
Custom Status Line Example
Using a custom statusLine hook in ~/.claude/settings.json:
{
"statusLine": {
"type": "command",
"command": "node \"/path/to/statusline.js\""
}
}
The status line could display:
Opus 4.5 │ my-project ███████░░░ 72% │ ██████░░░░ 64% ⏱ 2h15m
↑ model ↑ context window ↑ plan usage ↑ resets in
Proposed JSON Payload
Currently, custom statusLine commands receive JSON with context_window. Please add plan_usage:
{
"context_window": { "used": 72, "total": 100 },
"plan_usage": { "used_percent": 64, "resets_in": "2h15m" }
}
Why This Matters
- Prevents surprise rate limiting - Users can pace their work knowing how much quota remains
- Better session planning - Know whether to start a complex task or wait for reset
- Enables custom displays - Users can build their own status line visualizations
Scope
This applies to subscription-based accounts only (Claude Pro/Max). API accounts (pay-as-you-go) have no usage cap.
Current Workaround Attempts
We attempted to scrape the usage page automatically, but Cloudflare's bot protection blocks:
- Direct API/curl requests
- Headless browsers (Playwright/Puppeteer)
- Browsers with anti-detection flags
- Even visible automated browsers get stuck in verification loops
This data can only be reliably accessed if Anthropic exposes it in the statusLine JSON payload.
---
Submitted via Claude Code session
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗