Feature: Add plan usage percentage to statusline JSON input
Feature Request
Current behavior:
The custom statusline command receives JSON input via stdin with fields like context_window.used_percentage, model.display_name, cost.total_cost_usd, etc. However, plan usage limits (the data shown by /usage command) is not included.
Desired behavior:
Add plan usage fields to the statusline JSON input, e.g.:
plan_usage.used_percentage— current session usage percentage (e.g. 23)plan_usage.resets_at— next reset time (e.g. "9am Asia/Taipei")
Why:
For Max plan subscribers, plan usage is the most important quota to monitor — not session cost. The /usage command already displays this data, but it requires manual invocation and interrupts workflow. Having it in the statusline would allow users to passively monitor their remaining quota.
Workaround attempted:
None available. The statusline script only has access to the JSON fields provided by Claude Code. There is no public API endpoint or local file to query plan usage programmatically.
Environment:
- Claude Code CLI on Windows 10
- Max plan subscriber
- Custom statusline already configured with context window + model display
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗