What
The gateway bundled with Claude Code is a proxy that sits between Claude Code and the model provider and can enforce spending caps. It can now enforce a budget shared by a whole group of users (an RBAC group, a role-based permission group), in addition to each developer's own cap.
- The gateway's database update adds
pooled_limit_enabledandpooled_monthly_credit_limitto thespend_limitstable, plus a newpooled_spendtable. - The schema for setting limits gains a
pooled_budgetobject. - On each request the gateway checks the group's shared budget. When it is used up, the request is refused with a 429
billing_error, and the groups involved are logged. - If the shared-budget check itself fails, the gateway logs "pooled spend check failed, so group budgets are not enforced (developers' own caps are)", at most once a minute. Each developer's own cap still applies.
- After each request the gateway records spending against the pool, and warns if that write has not finished after 30 seconds.
- The retention job now also deletes
pooled_spendrows older than the retention window. - The built-in gateway documentation now explains group-shared budgets: a 429
billing_errorcan mean the group budget ran out, and the gateway then sends the monthly limit details plus the headeranthropic-ratelimit-unified-overage-scope: group_pool. The header is sent when the scope type isgroup_pool.
Why
Administrators running the bundled gateway can cap spending for a whole group, not only for each person. If you hit a 429 billing_error with the group_pool scope, it is your group's shared budget that ran out, not your own.