You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
ci(evals): refuse an opted-in compare run when the subscription account's weekly headroom is low #18235
With the org's API key disabled (CLAUDE_API_KEYS_DISABLED=true since 2026-11-19), a required compare-mode eval run can opt in to the maintenance subscription token (#18234). The owner's condition on that (2026-11-22): runs must not "blow through our remaining usage." For now #18234 guards this with a hard cap: an opted-in dispatch is refused above cost-cap-usd 5 per pass. That cap is a list-price estimate and cannot see how much weekly usage the account has left.
The only usage reader found is in claude-code-account-rotation, which calls https://api.anthropic.com/api/oauth/usage (src/ClaudeCodeAccountRotation.App/Adapters/Http/AnthropicEndpoints.cs:15). That endpoint is undocumented. Whether a CI CLAUDE_CODE_OAUTH_TOKEN (a setup token) is allowed to call it is UNVERIFIED.
Proposed work
Confirm the endpoint's current behavior and response fields, and whether a setup token's scope can read it: one read with the maintenance token in a dispatch job, printing only the utilization numbers, never the token.
If it can: add a pre-step to the opted-in compare passes that reads weekly utilization before any agent run, and refuses above a threshold held in a repository variable (default 80%).
If it cannot: record that here, keep the 5 USD per-pass cap as the guard, and close.
Acceptance criteria
A recorded read shows whether a setup token can call the usage endpoint, with the fields it returns
If yes, an opted-in dispatch above the threshold runs no agent and says why, and a test pins the refusal
Moot: #18268 removed every subscription and fallback eval leg, so no eval path reads a subscription token and a subscription headroom pre-step has nothing to guard. Evals run on the maintenance API key alone (owner decision Q14) under docs/review/evals.md (#18269).
Activity
kyle-sexton commentedon Nov 23, 2026
Moot: #18268 removed every subscription and fallback eval leg, so no eval path reads a subscription token and a subscription headroom pre-step has nothing to guard. Evals run on the maintenance API key alone (owner decision Q14) under docs/review/evals.md (#18269).