Horios (2a): If the Sanhedrin mistakenly rules that it is permissible to transgress one of the mitzvos of the Torah and an individual does so by error because of their ruling… he is exempt from bring a sin offering according to R’ Yehuda but not according to the Sages because he relied on the ruling of the Sanhedrin. However if when the Sanhedrin issued their erroneous ruling, one of its members was aware that the ruling was mistaken or even a student who was capable of deciding the law himself was aware that the ruling was mistaken – and yet he acted according to the mistaken ruling…. he is obligated to bring a sin offering since he wasn’t dependent on the ruling of the Sanhedrin….
Ramban (Devarim 17:11): Left and Right. Rashi explains that even if the Sanhedrin tell you that right is left or left is right –you must obey them. Meaning that even if you are certain that the Sanhedrin has erred and it is as obvious to you as the difference between your right and left – you still must comply with their understanding of the Torah. In other words you can’t argue, “How can I eat that which is prohibited by the Torah or how can I execute this person when I know he has not transgressed?” Rather your attitude must be, “The absolute obedience to the rulings of the Sanhedrin is what G d has commanded me and I must observe the mitzvos exactly as the Sanhedrin says. The Torah was given to me according to their understanding – even if they err.” This is what happened when R’ Yehoshua had a dispute with the Sanhedrin as to what day was Yom Kippur. R’ Gamliel the head of the Sanhedrin ordered R’ Yehoshua to appear before him on the day that he thought was Yom Kippur. the necessity for this mitzva is very great. That is because the Torah was given to us in writing and it is known that people don’t think identically in all matters. Therefore it would be natural for disputes over what the Torah means to continually multiply and it would end up that there would be many Torahs instead of one. That is why this verse tells you that one must obey the Sanhedrin which convenes in G d’s presence in the Temple – in everything they say concerning the understanding of the Torah. There is no difference in the requirement to obey whether this Torah understanding is part of the Tradition which goes back what G d told Moshe or what their understanding of the meaning or intent of a Torah verse. This requirement to accept their Torah understanding is because the Torah was in fact given to us according to their understanding. Therefore they must be obeyed even if their view contrasts with your understanding as left contrasts with right and surely if you agree with their understanding. That is because G d’s spirit is on those who serve in His Temple and He does not desert His pious ones. G d always protects them from error and mistake. The Sifri says that you must obey them even if appears that they have reversed right with left and left with right.
Michtav M’Eliyahu (1:75): The Talmudic sages (Chazal) have told us to obey the words of gedolim – even if they tell us that left is right. This expression isn’t meant to imply that we must obey them even when they have actually erred. But rather that we must listen to them even when we - with our lowly understanding – think that we definitely have observed that they have erred. That is because our senses are totally nothing as if they were the dust of the earth compared to the clarity of their intellect and the Heavenly support they have. Thus our belief that they have erred has no practical consequences since there is a rule that a beis din cannot nullify the ruling of another beis din unless it is greater in wisdom and number. Even without this rule it is clear that what we think is awareness or experience is only a figment of our imagination and unstable moods. This superiority is Daas Torah within the framework of emunas chachom (faith in our sages).
Chinuch (#495): And you obey all Sanhedrin’s rulings - … This applies in the time when there was a Sanhedrin in Jerusalem and it applies equally to both males and females. Everyone is commanded to do exactly as they teach. Included in this mitzvah is the obligation to listen in every generation to the judge. In other words to a major sages who live in your time and generation. This is explained in Rosh HaShanna (25b), “And to the judge which will be in your days. Yiftach in his generation is like Shmuel in his.” In other words we are required to listen to Yiftach in his generation just as we listen to Shmuel in his generation. Therefore if one transgresses this commandment and does not obey the directives of the gedolim of his generation according to that which they teach – he has nullified this commandment. The punishment for transgressing it is very great since this is the strong foundation that the Torah rests on and it is well known to all who are intelligent.
Minchas Chinuch (#496): … It appears as if the Torah commandments to obey rabbinic authority only apply to the Sanhedrin of Jerusalem. Consequently the status of zakein mamrei only applies to the Sanhedrin as we will explain later [section 6]. Thus the prohibition of lo sasur only applies to it. Therefore after the Sanhedrin moved from the Temple mount it is possible that these Torah commandments do not apply to the beis din in subsequent times. This is apparent from the language of the Torah itself which states “When you will go up” which refers to the Sanhedrin and “And you shall do according to what they tell you… from that place do not turn…”. All of this is clearly referring to the Sanhedrin in Jerusalem. So the question is what is the source that requires obeying the sages in each generation? The Chinuch writes here - included in the mitzvah to listen to the Sanhedrin is the requirement to listen and do what the sages say in all generations…Therefore he concludes that if one does not obey the directives of the gedolim in his generation he transgresses these mitzvos. But how does the Chinuch know this? The Sanhedrin is obviously unique because the glory of G d is present there every day and the Torah was entrusted to them… However it appears that this is from the words of the Rambam in Sefer HaMitzvos and his Introduction to Mishneh Torah and in the Ramban and they certainly must have found a source for it. However the Ramban restricts the authority of Sanhedrin which is learned from these verses. He says that this commandment to listen to the Sanhedrin only applies to their explanation of a Torah verse or what they say is from Moshe based on the oral tradition or what they learn using the 13 Hermeneutic Principles. Thus it only applies to Torah laws… Consequently the Torah says that it is necessary to act according to the words of the Sanhedrin when they explain Torah laws or else it is a transgression of this prohibition and commandment. In contrast those things were decreed by the Sages are not included in this Torah obligation. The Sages merely associated this Torah verse with the obligation to listen to their decrees – but in fact that is not the intent of the verse. See the Ramban for an extensive discussion of this. Be aware that even according to the view of the Ramban – there are many Torah laws which are learned from the 13 Hermeneutic Principles or from Moshe based on the oral tradition. Therefore when these are transgressed – not only is it a violation of the Torah verses but it is also a violation of the verses to obey the Sanhedrin. Thus they are to be viewed more seriously than Torah laws which are stated explicitly in the Torah.