Each Imam knows the succeeding Imam (a.s.) The words of Allah, the Most High, “Allah commands you to deliver the trust to its people,”(4:58) is a reference to the Imams (a.s.)

Al-Kāfi|Volume 1|Book 4|Chapter 59