ʿAli said: There was a time before dawn when I would ask to enter upon the Messenger of Allah ﷺ. If he was praying, he would say Subhan Allah to me, and that was my permission to enter; if he was not praying, he would give me permission to enter. (Using translation from Aḥmad 570)
قَالَ عَلِيٌّ «كَانَتْ لِي سَاعَةٌ مِنَ السَّحَرِ أَدْخُلُ فِيهَا عَلَى رَسُولِ اللهِ ﷺ فَإنْ كَانَ فِي صَلَاتِهِ سَبَّحَ فَكَانَ ذَلِكَ إِذْنُهُ لِي وَإِنْ لَمْ يَكُنْ فِي صَلَاتِهِ أَذِنَ لِي»