Feature request: expose /usage stats (session & weekly rate-limit) in statusline stdin JSON

Resolved 💬 3 comments Opened Mar 10, 2026 by Douglas-W-Williams Closed Mar 14, 2026

Summary

The statusline command receives a JSON payload via stdin with fields like context_window, model, etc. However, the rate-limit usage data shown in the /usage dialog (current session %, current week %, and reset times) is not included in this payload.

Current behavior

The /usage dialog shows:

  • Current session: e.g. 77% used, resets at 2pm
  • Current week (all models): e.g. 36% used, resets Mar 13

This data is fetched live from the Anthropic API when the dialog opens but is never written to any local file or exposed in the statusline stdin JSON.

Requested behavior

Add rate-limit/usage fields to the statusline stdin JSON payload, for example:

{
  "usage": {
    "session": {
      "used_percentage": 77,
      "resets_at": "2026-03-10T19:00:00Z"
    },
    "weekly": {
      "used_percentage": 36,
      "resets_at": "2026-03-13T17:00:00Z"
    }
  }
}

Use case

This would allow statusline scripts to display color-coded bar graphs for both context window usage and session rate-limit usage — giving users a real-time heads-up before hitting rate limits, directly in their editor status bar (e.g. Obsidian, VS Code, etc.).

Currently the only workaround is hardcoding the reset time, which is fragile and unhelpful.

🤖 Submitted via Claude Code

View original on GitHub ↗

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