Was Ismail son of Imam al-Sadiq (as) designated as an Imam by his father but passed away in his lifetime? And if so, why was there a change in decree regarding this matter that resulted in Imam Musa Kazim (as) becoming the next Imam instead?
There is no single authentic narration from Imam Jafar Al-Sadiq (AS) has ever said that his son Ismail will be the Imam after him. On the contrary, there are authentic narrations from Imam Jafar Al-Sadiq (AS) stating that Ismail is not the Imam. When Ismail passed away during the life of his father, Imam Jafar Al-Sadiq (AS) opened his coffin many times and called people to witness his death and warned them from thinking that Ismail will succeed him as an Imam.
No change in decree regarding this mater at all. Imam Musa Ibn Jafar (AS) was the Imam right from the beginning when the Prophet Muhammad (SAWA) informed about the names of the twelve Imams.
The dangerous political situation of Abbasids against Ahlul Bayt (AS), did not allow the names of some Imams to be declared in public as the tyrant rulers were after their lives. Imam Jafar Al-Sadiq (AS) made his last well for five persons to save Imam Musa Al-Kadhim (AS) from the evil of the Abbasid ruler Abu Jafar al-Mansour. Imam made his last well for : 1. His son Abdullah, 2. His wife Hameeda, 3. Al-Mansour himself, 4. The ruler of Madina on behalf of Al-Mansour and 5. Imam Musa Ibn Jafar (AS).
BY this way, Imam Jafar Al-Sadiq (AS) could save Imam Musa Al-Kadhim from the evil acts of Al-Mansour.
The claim of Imamate of Ismail was made by people supported by Abbasid rulers to weaken the unity of the Shia. As he was dead when Imam Jafar Al-Sadiq (AS was martyred, the Abbasid agents claimed his son Mohammad Ibn Ismail as an Imam.
If you read about this mater, you will clearly see that here is comparison between the knowledge and behavior of Imam Musa Al-Kadhim (AS) and Mohammad Ibn Ismail at all.
The Imamate of Imam Musa Ibn Jafar Al-Kadhim (AS) is supported by most authentic evidence, exactly like the evidence of Imamate of Imam Jafar Al-Sadiq (AS) and previous Imams (AS).