Skip to content

rate_limits (seven_day, five_hour) missing from statusLine JSON input #45133

Description

Description

The statusLine command input JSON no longer includes the rate_limits object. Specifically, rate_limits.seven_day and rate_limits.five_hour (with used_percentage and resets_at fields) are absent from the JSON piped to custom statusLine commands.

Expected behavior

The statusLine JSON should include:

"rate_limits": {
  "five_hour": {
    "used_percentage": 23.5,
    "resets_at": 1738425600
  },
  "seven_day": {
    "used_percentage": 41.2,
    "resets_at": 1738857600
  }
}

Actual behavior

The JSON payload contains session_id, transcript_path, cwd, model, workspace, version, output_style, cost, context_window, and exceeds_200k_tokens — but no rate_limits object at all.

Why this matters

For Max subscribers, the 7-day and 5-hour rate limit pacing is the single most useful statusLine metric. I display it as 7d:used%/elapsed% to see at a glance whether I'm ahead of or behind my weekly budget. Without it, there's no way to monitor quota usage from the status bar.

The cost object was added (which is nice), but it doesn't replace rate limit visibility — cost in USD doesn't help when the constraint is a percentage-based rolling window.

Environment

  • Claude Code v2.1.96
  • Claude Max subscription
  • Linux (Ubuntu)
  • Custom statusLine command (bash script reading JSON from stdin)

Reproduction

Set a custom statusLine command and inspect the JSON input — rate_limits is missing:

# In settings.json:
"statusLine": {
  "type": "command",
  "command": "bash /path/to/script.sh"
}

# In script.sh:
input=$(cat)
echo "$input" | jq '.rate_limits'  # → null

Metadata

Metadata

Assignees

No one assigned

    Labels

    duplicateThis issue or pull request already exists

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions