Al-Khidr said: "Are you the Moses of the Children of Israel?" He welcomed him and said: "What has brought you?" He said: "I have come to you so that you may teach me from what you have been taught of sound judgment." He said: "Indeed, you will not be able to have patience with me," meaning: you will not be able to bear that.
Moses said: "You will find me, if Allah wills, patient, and I will not disobey any command of yours." So he departed with him and said to him: "Do not ask me about anything I do until I clarify its nature to you." That is the meaning of His saying: "Until I initiate for you a mention of it."
12878 - From the path of Harun ibn 'Antara, from his father, from Ibn Abbas who said: Moses asked his Lord, saying: "O Lord, which of Your servants is most beloved to You?" He said: "The one who remembers Me and does not forget Me." He said: "Which of Your servants is the most just in judgment?" He said: "The one who judges with the truth and does not follow desire." He said: "Which of Your servants is the most knowledgeable?" He said: "The one who seeks the knowledge of the people to add to his own knowledge, in the hope that he might come across a word that guides him to guidance or keeps him away from ruin." Moses had previously thought to himself that there was no one more knowledgeable than him. He said: "Lord, is there anyone more knowledgeable than me?" He said: "Yes." He said: "Where is he?" It was said to him: "At the rock where the spring is."
So Moses set out seeking him until what Allah has mentioned occurred. Moses reached him at the rock, and they both greeted each other. Moses said to him: "I wish for you to accompany me." He said: "You will not be able to endure my company." He said: "Yes, I will." He said: "If you accompany me, then do not ask me about anything until I initiate for you a mention of it." He traveled with him along the sea until they reached the junction of the two seas, a place in the sea where there was no place with more water. He said: "Allah sent a swallow, which began to draw water from it with its beak. He said to Moses: 'How much do you see this swallow has taken from the water with its beak?' He said: 'How little is what it has taken!' He said: 'Indeed, my knowledge and your knowledge in the knowledge of Allah is like the amount this swallow has taken from this water.'" He mentioned the rest of the hadith concerning the scuttling of the boat, the killing of the boy, and the repairing of the wall. Moses’s questioning about the wall was for himself regarding something of worldly affairs, while his questioning about the boat and the boy was for the sake of Allah, the Exalted.
(1). al-Durr 5/418, 419. (2). al-Durr 5/419.