Add weekly and session usage percentages to status line JSON input

Resolved 💬 5 comments Opened Jan 23, 2026 by dcox79 Closed Feb 28, 2026

Currently, the JSON passed to custom status line scripts (via statusLineCommand) includes context window and cost data, but does not include weekly or session usage percentages.

Current behavior:

  • The /usage slash command shows weekly and session usage in the interactive session
  • Status line scripts receive JSON with .context_window.used_percentage, .cost.total_cost_usd, etc.
  • Weekly/session usage percentages are NOT included in this JSON

Requested feature:
Add weekly and session usage data to the status line JSON input, such as:

{
  "usage": {
    "weekly": {
      "percentage": 45,
      "used": "450000",
      "limit": "1000000"
    },
    "session": {
      "percentage": 12,
      "used": "120000",
      "limit": "1000000"
    }
  }
}

Use case:
This would allow users to display their API usage limits directly in the status line, making it easier to monitor consumption without running /usage manually.

Workaround attempted:
Tried calling claude usage --format=json from the status line script, but this command doesn't exist as a CLI option.

Environment:

  • Claude Code version: 2.1.19
  • Platform: macOS (Darwin 25.2.0)

View original on GitHub ↗

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