Statusline hook payload no longer includes `rate_limits` field (v2.1.138)
Summary
The JSON payload piped to the statusline hook command no longer contains the rate_limits field as of Claude Code 2.1.138. Any statusline script that reads .rate_limits.five_hour or .rate_limits.seven_day now reads empty. Downstream tools (e.g. abtop) that depend on the statusline hook to track usage have stopped working.
Environment
- Claude Code: 2.1.138
- OS: macOS 26.5 (Build 25F71)
- Statusline configured via
~/.claude/settings.json→statusLine.command
Repro
- Configure a statusline command that dumps stdin to a file:
``bash``
#!/bin/bash
input=$(cat)
echo "$input" > /tmp/statusline-payload.json
printf '%b' "ok"
- Trigger any statusline refresh in an active Claude Code session.
- Inspect
/tmp/statusline-payload.json.
Actual payload (v2.1.138)
{
"session_id": "...",
"transcript_path": "...",
"cwd": "...",
"effort": {"level": "high"},
"session_name": "...",
"model": {"id": "claude-opus-4-7[1m]", "display_name": "Opus 4.7 (1M context)"},
"workspace": {...},
"version": "2.1.138",
"output_style": {...},
"cost": {...},
"context_window": {...},
"exceeds_200k_tokens": true,
"fast_mode": false,
"thinking": {"enabled": true}
}
Note the absence of any rate_limits key.
Expected payload (prior versions)
The payload used to include a rate_limits envelope with at least:
"rate_limits": {
"five_hour": {"used_percentage": <0-100>, "resets_at": <unix-epoch>},
"seven_day": {"used_percentage": <0-100>, "resets_at": <unix-epoch>}
}
This is what tools like abtop read via its --setup-installed statusline wrapper. With the field gone, the tool's quota panel shows stale or empty data with no way to recover.
Impact
- Third-party tools depending on the statusline hook to expose Claude Code usage (abtop and similar) have silently stopped updating.
- No alternate on-disk surface for the current 5h / 7d / weekly limits exists; the only source remaining is the claude.ai web UI at
/settings/usage, which isn't scriptable. - Hook scripts that conditionally write a quota file on
if rate_limitsappear to "fail silently" because the field is missing rather than empty.
Asks
- Restore
rate_limitsin the statusline hook payload, ideally with the same shape as prior versions to avoid breaking existing third-party tools. - Consider extending the field to surface the newer claude.ai metrics (weekly Opus cap, weekly total cap) that currently only appear in the web UI - these are increasingly load-bearing for users managing higher-tier subscriptions across teams.
- Document the statusline payload schema if it's intended to be a stable contract, since third-party tooling now depends on it.
Happy to provide additional payload samples or repro on different versions if helpful.
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗