Add extra usage / billing status fields to status line JSON

Resolved 💬 3 comments Opened Feb 22, 2026 by hwinkel Closed Feb 26, 2026

Feature Request

Problem

On a Max subscription, users can be charged extra usage costs in two scenarios:

  1. Extended context (1M) — always billed at extra usage rates
  2. Rate limit overflow — when daily/weekly subscription limits are exceeded, Claude Code switches to extra usage billing

The status line JSON currently provides context_window.context_window_size which lets scripts detect scenario 1, but there is no field to detect scenario 2. This means status line scripts cannot accurately show cost information only when it's relevant.

Proposed Solution

Add billing/extra usage fields to the status line JSON, for example:

{
  "billing": {
    "mode": "subscription" | "extra_usage",
    "extra_usage_active": true | false,
    "reason": "extended_context" | "rate_limit_exceeded" | null,
    "rate_limit": {
      "daily_remaining": 0.75,
      "weekly_remaining": 0.50
    }
  }
}

At minimum, a simple boolean like billing.extra_usage_active would allow status line scripts to conditionally show cost estimates only when the user is actually being charged.

Use Case

Users on Max subscriptions want to:

  • See estimated costs only when extra usage is active (not when usage is included in subscription)
  • Know when they've hit rate limits and switched to extra usage billing
  • Make informed decisions about continuing expensive operations

Current Workaround

Scripts can check context_window_size >= 1000000 to detect extended context, but there is no workaround for detecting rate limit overflow billing.

---

🤖 Generated with Claude Code

View original on GitHub ↗

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