He and Hurr bin Qays al-Fazari had a dispute about the companion of Musa. Ibn Abbas said he was Khidr.Ubayy bin Kaab passed by them, so Ibn Abbas called him over and said, "I had a dispute with this companion of mine about the companion of Musa, the one whom Musa asked for the way to meet. Did you hear the Messenger of Allah ﷺ mention his story?"Ubayy replied, "Yes, I heard the Messenger of Allah ﷺ say, 'While Musa was among a gathering of the Children of Israil, a man came to him and asked, "Do you know anyone more knowledgeable than you?" Musa answered, "No." So Allah revealed to Musa, "Yes, Our servant Khidr." Musa then asked for the way to reach him, and Allah made the fish a sign for him. He was told, "When you lose the fish, turn back, for you will meet him." So he followed the trail of the fish in the sea.His servant said to Musa, "Do you remember when we took refuge at the rock? Indeed, I forgot the fish, and none made me forget to mention it except Satan." [Kahf 18:63]Musa said, "That is what we were seeking. So they returned, following their footprints." [Kahf 18:64]Then they found Khidr, and what happened between them was as Allah recounted in His Book.'"
حدثنا عمرو بن محمد حدثنا يعقوب بن إبراهيم قال حدثني أبي عن صالح عن ابن شهاب أن عبيد الله بن عبد الله أخبره
أنه تمارى هو والحر بن قيس الفزاري في صاحب موسى قال ابن عباس هو خضر فمر بهما أبي بن كعب فدعاه ابن عباس فقال إني تماريت أنا وصاحبي هذا في صاحب موسى الذي سأل السبيل إلى لقيه هل سمعت رسول الله ﷺ يذكر شأنه قال نعم سمعت رسول الله ﷺ يقول بينما موسى في ملإ من بني إسرائيل جاءه رجل فقال هل تعلم أحدا أعلم منك قال لا فأوحى الله إلى موسى بلى عبدنا خضر فسأل موسى السبيل إليه فجعل له الحوت آية وقيل له إذا فقدت الحوت فارجع فإنك ستلقاه فكان يتبع أثر الحوت في البحر فقال لموسى فتاه {أرأيت إذ أوينا إلى الصخرة فإني نسيت الحوت وما أنسانيه إلا الشيطان أن أذكره} فقال موسى {ذلك ما كنا نبغ فارتدا على آثارهما قصصا} فوجدا خضرا فكان من شأنهما الذي قص الله في كتابه