Praise be to Allah.
If the mu’takif (person observing i’tikaaf) goes out of the mosque, his i’tikaaf is invalidated, because i’tikaaf means staying in the mosque to worship Allaah.
That applies unless the mu’takif goes out for an unavoidable reason, such as to relieve himself, to do wudoo’ or ghusl, or to bring food if he does not have anyone to bring food to the mosque for him, and other similar matters which cannot be avoided and which cannot be done in the mosque.
Al-Bukhaari (2092) and Muslim (297) narrated that ‘Aa’ishah (may Allaah be pleased with her) said: The Messenger of Allaah (peace and blessings of Allaah be upon him) used not to enter the house except for things that a person needs when he was observing i’tikaaf.
Ibn Qudaamah (may Allaah have mercy on him) said in al-Mughni (4/466):
What is meant by things that a person needs is to urinate and defecate, because every person need to do that. Similarly, he also needs to eat and drink. If he does not have anyone who can bring him food and drink, then he may go out to get them if he needs to. For everything that he cannot do without and cannot do in the mosque, he may go out for that purpose, and that does not invalidate his i’tikaaf, so long as he does not take a long time doing it.
If the mu’takif goes out to do his work, this is something that invalidates i’tikaaf.
The Standing Committee was asked:
Is it permissible for the mu’takif to visit someone who is sick or to accept an invitation or to attend to his family’s needs or to attend a funeral or to go to work?
The Sunnah is that the mu’takif should not visit one who is sick during his i’tikaaf, or accept any invitation, or attend to his family’s needs, or attend any funeral, or go to work outside the mosque, because it was proven that ‘Aa’ishah (may Allaah be pleased with him) said: “The Sunnah is for the mu’takif not to visit any sick person, or attend any funeral, or touch his wife or be intimate with her, or to go out for any purpose except those which cannot be avoided.”
Narrated by Abu Dawood, 2473.
Fataawa al-Lajnah al-Daa’imah, 10/410.