What
This applies when you sign in through a gateway, meaning your organisation routes Claude Code through its own server, and an overage (spend) limit is set.
- Claude Code now reads
${url}/api/oauth/usageon the gateway to get the spend record: the monthly limit, the credits used, the currency and the active limit group. - The data passed to custom status line scripts now includes
used_usd,limit_usdand an optionalperiodunderrate_limits.spend_limit, next to the existingused_percentageandresets_at. The status line is the bar at the bottom of the screen, which you can customise with your own script. The amounts are converted from cents to dollars. - The dollar figures are filled in only when the currency is USD and the record's reset time matches the overage limit's
resets_at. - The usage settings panel shows the same figures for gateway users.
- Reads are cached per sign-in. A failed read is logged as
[gateway-usage] read failed.
Why
If your team uses a gateway, you and your status line scripts can now see how many dollars you have spent against your limit, not just a percentage.
Names in the bundlerate_limits.spend_limit
The entry above is what we published on the day. These lines were added later, as Anthropic's own pages caught up, and they sit beside the original rather than replacing it.
Added since
A small documentation edit on Customize your status line touched a line naming rate_limits.spend_limit after this was published.
Treat `used_usd`, `limit_usd`, and `period` as optional even when `spend_limit` is present, because your script receives the percentage before them. Read each with a fallback in your script, such as `jq -r '.rate_limits.spend_limit.used_us…statusline see the edit
Confirmed since
Anthropic's documentation has since written up rate_limits.spend_limit, on Claude apps gateway spend limits.
| A **Spend limit** bar in `/usage` with the percentage of their cap used and when it resets, and a `rate_limits.spend_limit` object in the status line input | v2.1.251 or later | v2.1.225 or later |claude-apps-gateway-spend-limits see the edit
Two sources agreeTwo things we can check say the same as this entry.
Anthropic's documentation agrees
Anthropic's documentation has since written up rate_limits.spend_limit, on Claude apps gateway spend limits.
Anthropic's release notes agree
Added dollar amounts to the Claude apps gateway spend limit in /usage and the status line (for example "$271.40 / $500.00 spent this month")…