Statusline hook payload no longer includes `rate_limits` field (v2.1.138)

Resolved 💬 3 comments Opened May 19, 2026 by doreilly257 Closed May 23, 2026

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.jsonstatusLine.command

Repro

  1. Configure a statusline command that dumps stdin to a file:

``bash
#!/bin/bash
input=$(cat)
echo "$input" > /tmp/statusline-payload.json
printf '%b' "ok"
``

  1. Trigger any statusline refresh in an active Claude Code session.
  1. 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_limits appear to "fail silently" because the field is missing rather than empty.

Asks

  1. Restore rate_limits in the statusline hook payload, ideally with the same shape as prior versions to avoid breaking existing third-party tools.
  2. 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.
  3. 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.

View original on GitHub ↗

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