Who will appoint the members of Sanhedrin when Moshiach comes?
According to Maimonides, they will be appointed with the approval of all Jewish sages of the generation.
Members of the Sanhedrin must be designated through semicha, a ceremonial appointment of one rabbi by another, who also received semicha, in an unbroken chain leading directly back to Moses. There are no rabbis today who can be confirmed to have received semicha in this manner. Therefore, it is not known conclusively how the members of the Sanhedrin will be appointed.
Maimonides addresses this issue, and suggests that there may be an alternative to semicha. Perhaps, the members of the Sanhedrin will be appointed with the unanimous approval of all Jewish sages of the generation. To quote Maimonides: “If not [for this method,] there is no possibility of ever appointing a High Court, since each of the judges must have received semicha… [and if you will say, that perhaps the High Court never will be reappointed,] G-d has already promised that it will be restored, as the verse says, “And I will restore your judges as before.”
The Ridbaz, on the other hand, writes that there is no support in the Talmud for Maimonides’ scenario. He presents a few options of his own, including the idea that Elijah the Prophet will appoint the members of Sanhedrin. Since Elijah received semicha from Achiya Hashiloni, who himself received semicha from Moses, he is qualified to give semicha to the members of Sanhedrin.
However, according to Tractate Eruvin, Elijah will appear before the High Court to herald the imminent arrival of Moshiach, which indicates that it will already be in place before Elijah’s coming. The Lubavitcher Rebbe suggests that perhaps the Talmud in this instance is referring not to the Sanhedrin, but to the highest Jewish court to exist at the time.
(Mishnah Torah, Hilchot Sanhedrin, 4:11, see also commentary of Ridbaz. Maimonides’ Commentary on the Mishnah, Sanhedrin, 1:3, see also Tosaphot Yom Tov, and Tumim 1:2. Likutei Sichot vol. 9, p. 105, footnote 74. ibid Vol. 29, p. 110)