Shalom Aleichem Rabbi,
In Divrei Chaim 2 Y.D. 105 the Sanzer Rebbe zy’a is asked about a school teacher who had denied the sefer Ohr HaChaim was written with Ruach HaKodesh. The Divrei Chaim took great exception to this and said he was an apikores and a kofer. He brought important sources but they focused on the Ruach HaKodesh of Chazal, meanwhile the Ohr HaChaim 6:3 seems to say explicitly that neither Ruach HaKodesh nor even “rei’ach hakodesh” remained in his day. How are we to relate to the difficulty in someone being named an apikores for denying the Ruach HaKodesh of a work that denied Ruach HaKodesh?
The point of the Divrei Chaim is trying to make seems to be less about the specifics of Ruach Hakodesh and more about our mesores. The Ohr Hachaim Hakadosh has been accepted as one of the great luminaries and tzaddikim of the last thousand years. He was known to be a great kabbalist as is clear from his written works. The teacher seems to have been conveying to his students a belittling image of the Ohr Hachaim. To this end the Divrei Chaim writes that if we start questioning the greatness of the Achronim this is a slippery slope.
The actual question of Ruach Hakodesh in our times is a valid one. As is clear from the Divrei Chaim there are many levels and types of Ruach Hakodesh. Certainly great tazdikim in every generation have some level of Divine inspiration and insight. The Ohr Hachaim may have been discussing a different aspect of Ruach Hakodesh.