Ubayy. Yahya bin Saeed once said, narrating from Umar, that he said, "Messenger of Allah, I vowed during the days of ignorance to spend a night in spiritual retreat in the mosque."He replied, "Fulfill your vow."
حدثنا يحيى عن عبيد الله حدثني نافع
أبي وقال يحيى بن سعيد مرة عن عمر أنه قال يا رسول الله نذرت في الجاهلية أن أعتكف ليلة في المسجد فقال وف بنذرك
Its isnad is sahih. It is a repetition of 255 in the Musnad of Umar with this same isnad, and there it is affirmed that it is from Ibn Umar from Umar. Ibn Umar would sometimes narrate it as a mursal report, as has already occurred in 4577 and 4922, in which case it would be a mursal report of a companion. But it seems to me that it actually belongs to the Musnad of Ibn Umar, as indicated by the wording of 4922, and that his statement "from Umar" means he is referring to the story of Umar in this incident.