The Messenger of Allah ﷺ said, "Adam and Musa met. Musa said to him, 'You are Adam, whom Allah created with His own hand, in whose dwelling He placed His paradise, and to whom He commanded His angels to prostrate, then you did what you did.'Adam replied, 'You are Musa, whom Allah spoke to directly and to whom He revealed the Torah. Tell me, did you find it written about me before I was even created?'Musa said, 'Yes.'Adam said, 'Then why do you blame me for something Allah had decreed upon me before He created me?'"So Adam got the better of Musa in argument, peace be upon them both.
حدثنا حسين حدثنا جرير عن محمد
قال رسول الله ﷺ لقي آدم موسى فقال أنت آدم الذي خلقك الله بيده وأسكنك جنته وأسجد لك ملائكته ثم صنعت ما صنعت فقال آدم لموسى أنت الذي كلمك الله وأنزل عليك التوراة قال نعم قال فهل تجده مكتوبا علي قبل أن أخلق قال نعم قال فحج آدم موسى عليهما السلام
Its isnad is sahih. It occurred previously at 623, and see it with similar wording at 7549 as "Adam and Musa disputed," and see it under "Adam argued." The hadith is found in Bukhari 82/9 in the Book of Tawhid, under his saying, "and Allah spoke to Musa directly," and in Muslim 2042/4 no. 2652 in the Book of Qadr, under "the argument of Adam and Musa," and in Abu Dawud 226/4 no. 4701 in the Book of Sunnah, on Qadr.