package executor import "strings" // isQuotaExhausted returns true if err indicates the 5-hour Claude usage quota // is fully exhausted. Unlike transient rate limits, these should not be retried. func isQuotaExhausted(err error) bool { if err == nil { return false } msg := strings.ToLower(err.Error()) return strings.Contains(msg, "hit your limit") || strings.Contains(msg, "you've hit your limit") || strings.Contains(msg, "you have hit your limit") || strings.Contains(msg, "rate limit reached (rejected)") || strings.Contains(msg, "status: rejected") || // Gemini CLI quota exhaustion strings.Contains(msg, "terminalquotaerror") || strings.Contains(msg, "exhausted your daily quota") || strings.Contains(msg, "generate_content_free_tier_requests") }