Ayesha reported,

The Messenger of Allah ﷺ mentioned that he intended to observe spiritual retreat during the last ten days of Ramadan. Ayesha asked his permission to join him in retreat, and he granted it to her. Hafsa then asked Ayesha to seek permission on her behalf, which she did. When Zaynab bint Jahsh saw this, she ordered a tent to be set up, and one was put up for her.She said, whenever the Messenger of Allah ﷺ finished his prayer, he would withdraw to his tent. He noticed the tents and asked, "What is this?"They replied, "These are the tents of Ayesha, Hafsa, and Zaynab."The Messenger of Allah ﷺ said, "Is it righteousness they sought by this? I will not observe retreat." So he returned home, and after he broke his fast at the end of Ramadan, he observed retreat for ten days in Shawwal.

Bukhari 2045

Sahih

حدثنا محمد بن مقاتل أبو الحسن أخبرنا عبد الله أخبرنا الأوزاعي قال حدثني يحيى بن سعيد قال حدثتني عمرة بنت عبد الرحمن

عن عائشة رضي الله عنها

أن رسول الله ﷺ ذكر أن يعتكف العشر الأواخر من رمضان فاستأذنته عائشة فأذن لها وسألت حفصة عائشة أن تستأذن لها ففعلت فلما رأت ذلك زينب ابنة جحش أمرت ببناء فبني لها قالت وكان رسول الله ﷺ إذا صلى انصرف إلى بنائه فبصر بالأبنية فقال ما هذا قالوا بناء عائشة وحفصة وزينب فقال رسول الله ﷺ أالبر أردن بهذا ما أنا بمعتكف فرجع فلما أفطر اعتكف عشرا من شوال

البخاري 2045صحيح
Contents
Reference
Commentary
Ayat
Collection
Sahih Bukhari
Book
Itikaf
Chapter
Whoever wanted to observe itikaf then decided to leave
Numbering
Darussalam 2045
Bukhari 2045