QuotaExhausted has no reset field, body-first classification ladder, and waitability rules. Use when working with capacity.py or classify.py.
Install
npx skillscat add the-vibey-project/vibey/codexloop-quota-and-capacity Install via the SkillsCat registry.
SKILL.md
codexloop quota and capacity
QuotaExhausted is a billing wall with no resets_at — it is never
waitable and always needs a human to top up. Rate-limit windows are
waitable.
CapacityState variants
Available # green light
ThrottleExhausted # retry_after: timedelta | None
WindowExhausted # resets_at: datetime | None, window: str
QuotaExhausted # reason: str — TERMINAL, never waitable
AuthFailed # reason: str — TERMINAL
TransientBackendError # retry_after: timedelta | Noneis_waitable(state) returns False only for QuotaExhausted andAuthFailed.
Body-first classification
classify(signals) in domain/classify.py maps TurnSignals to aCapacityState using this ladder:
- Body wins.
error.code/error.typeoutrank HTTP status. - Auth:
error.code/error.typeinErrorClass.AUTH, or status 401
→AuthFailed. - Quota:
error.code/error.typeinErrorClass.QUOTA→QuotaExhausted(terminal). - Window:
ErrorClass.WINDOW→WindowExhaustedwithresets_atfrom
plan windows. - Throttle:
ErrorClass.THROTTLE→ThrottleExhaustedwithretry_after. - Transient:
ErrorClass.TRANSIENTor status 5xx →TransientBackendError. - Status 429 with no body marker →
WindowExhausted(resets_at=None). - Fallback:
Available.
High used_percent never outranks a billing marker. Completion claims
never outrank capacity rejection.