I was with Ibn Abbas when Zayd bin Thabit said to him, "Do you give a verdict that a menstruating woman may depart before her final visit to the House?"Ibn Abbas replied, "Yes."Zayd said, "Do not give such a verdict."Ibn Abbas said, "If you doubt it, then ask so-and-so, the Ansari woman, whether the Prophet ﷺ commanded her to do so."Zayd returned to Ibn Abbas laughing and said, "I see that you have spoken the truth."
حدثنا يحيى عن ابن جريج حدثني الحسن بن مسلم
كنت مع ابن عباس فقال له زيد بن ثابت أنت تفتي الحائض أن تصدر قبل أن يكون آخر عهدها بالبيت قال نعم قال فلا تفتي بذلك قال إما لا فاسأل فلانة الأنصارية هل أمرها النبي ﷺ بذلك فرجع زيد إلى ابن عباس يضحك فقال ما أراك إلا قد صدقت
Its isnad is sahih. Hasan bin Muslim bin Yanaq, his reliability was established earlier at 897, and in H it says "Hasan bin Muslim," which is an error. The hadith was narrated by Shafii in Risalah 1216 with our commentary, from Muslim bin Khalid, from Ibn Jurayj, and it was narrated by Bayhaqi 5:163 through the route of Rawh, from Ibn Jurayj. See also what comes at 3256 and the references we pointed to in the commentary on Risalah.