Expose weekly usage percentage in statusline context JSON

Open 💬 0 comments Opened Jun 19, 2026 by Gigisant

Feature Request

The /usage command displays the user's weekly usage percentage inside a Claude Code session, but this data is not available programmatically. The context window JSON piped to statusline scripts (statusLine in settings.json) includes model info and token counts, but not the account-level weekly usage percentage.

Requested Change

Include the weekly usage percentage (the same value shown by /usage) in the context window JSON object that is piped to statusline command scripts via stdin. For example:

{
  "model": { ... },
  "context_window": { ... },
  "account_usage": {
    "weekly_used_percentage": 42,
    "plan": "max"
  }
}

Why

Users who customize their statusline want to see at a glance how much of their weekly budget remains -- without having to interrupt their workflow to run /usage manually. The statusline infrastructure already exists and already receives JSON on stdin; adding this field would be a small, backwards-compatible addition that makes the statusline much more useful.

Current Workaround

None that is automated. The only option is to manually check /usage and mentally track the number.

View original on GitHub ↗