Hadithcore
Mishkat al-Masabih, 1142

‘Ali and Mu'adh b. Jabal reported God’s Messenger as saying, “When any of you comes to pray and the <i>imam</i> is at a certain point, he must do as the <i>imam</i> does.” Tirmidhi transmitted it and said this is a <i>gharib</i> tradition.

عَنْ عَلِيٍّ وَمُعَاذِ بْنِ جَبَلٍ رَضِيَ اللَّهُ عَنْهُمَا قَالَا: قَالَ رَسُولُ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ: «إِذَا أَتَى أَحَدُكُمْ الصَّلَاةَ وَالْإِمَامُ عَلَى حَالٍ فَلْيَصْنَعْ كَمَا يَصْنَعُ الْإِمَامُ» . رَوَاهُ التِّرْمِذِيُّ وَقَالَ: هَذَا حَدِيثٌ غَرِيبٌ

References1 variant
In-Book Reference
Book 4, Hadith 559