Reading the Rambam's introduction to his Mishne Torah, I am struck by the fact that he has Achiya haShiloni succeed David as headin the transmission of the SanhedrinOral Torah, and not David's son Shlomo. I'm curious as to why this is. Is he relying on a particular source that ascribes leadershipthis role to Achiya in the same generation? Or a particular source that specifically precludes Shlomo holding that officefulfilling it? David is the only king who both rules the nation and the Sanhedrinfeatures in this chain of transmission, so if there is a source that suggests that Shlomo did not head the Sanhedrinfeature in it because he was the king, it would also need to reckon with the fact that David did.
Note: an early version of this question asked why Achiya haShiloni and not Shlomo haMelekh was president of the Sanhedrin. Based on how the rabbonim understood Moshe, and based on their understanding of everybody from Ezra to Rabbi, I assumed that this went for everyone between Moshe and Ezra as well. I now realise that it may not have, and don’t want that to overshadow my question.