The Mechaber (151:1) says that eating and drinking in the Bais Haknesses and Bais Hamedrash is included in the prohibition of kalos rosh. [The Biur Halacha is not sure if the prohibition of eating in the Bais Haknesses is only if one eats b’keva – in a permanent fashion or even aray – in a temporary fashion.] However Talmidei Chachamim and their students are permitted to eat and drink there since there is nowhere else for them to eat. The Magen Avrohom says that for one who is always learning in the Bais Hamedrash it is considered a time of need. If they would need to go home to eat and drink they would waste too much time from their torah learning. However it may not be used as a shortcut or as a place to escape from the heat and rain and other activities mentioned in the Mechaber that are prohibited in the Bais Hamedrash.
The Rema brings the opinion of the Ran that eating in the Bais Hamedrash is always permissible for them even if there are other options. The reason is that since they are always learning in the Bais Hamedrash it is considered like their home. According to this opinion other activities besides for eating and drinking are also permitted in the Bais Hamedrash. They may enter even because of the rain or heat. However, even according to the Ran, activities of real kalos rosh may not be done in the Bais Hamedrash. The Biur Halacha points out that the Rema only brings the opinion of the Ran in regard to eating and drinking. It seems that the Rema does not want to rely on the opinion of the Ran to permit other activities besides for eating and drinking. The Biur Halacha rules leniently that one can rely on the opinion of the Ran and engage in other activities, since he spends his whole day in the Bais Hamedrash.
The Birkei Yosef says that the minhag today is to drink water in the Bais Haknesses. The Biur Halacha explains that people rely on the opinion that Batei Knessios outside of Eretz Yisroel may be built with a condition, which helps even when they are still being used. The Biur Halacha later on says that even in Eretz Yisroel it is possible to be lenient. The Biur Halacha says for one who is learning there, even if not for the whole day there is a different heter. Since otherwise he would need to waste time from his learning it is considered necessary for the purpose of doing a mitzvah. The Mechaber in seif daled says that it is permissible to eat in the Bais Haknesses for the need of a mitzvah. For example when they gather together in the Bais Haknesses to make a leap year it is permissible to eat there.
The Mishna Berura brings from the poskim that only such a seuda for those gathering together for a leap year which was a very simple meal consisting of bread and beans is allowed. However a seudas mitzvah where people will drink is prohibited even in a Bais Hamedrash. However one should not protest against those who make a Siyum Hashas in the Bais Hamedrash for they can rely on the opinion that a condition works even for an active Bais Haknesses. It seems from the Shar Hatziyun that this heter would work for other seudos mitzvah as well. However the Aruch Hashulchan says that only seudos that are connected to Torah like a siyum are allowed in the Bais Hamedrash. A seudas bris, pidyon haben or chasuna should not be made in a Bais Haknesses or Bais Hamedrash.
Reb Moshe zt”l (Igros Moshe Orach Chaim 1:45) says that today the minhag is to make everything in the Bais Haknesses even when it doesn’t necessarily have to be there. For example Shalosh Seudos which can really be eaten at home. Kiddushim for a Bar Mitzvah and chosson are also made in the Bais Haknesses. The reason is because the people doing so rely on the opinion of the Rishonim that building a Bais Haknesses with a condition works, even when the Bais Haknesses is completely active.
Most poskim say that smoking is the same halacha as eating and is prohibited in the Bais Haknesses and Bais Hamedrash. For someone who learns there the whole day it is permitted just like eating is. Reb Nissim Karelitz zt”l says that smoking may be more kalos rosh than eating and may be prohibited even for a Talmid Chocham. The Aruch Hashulchan says that building with a condition will not permit smoking in the Bais Haknesses or Bais Hamedrash.
Many poskim hold that shmek tabak should only be used privately for one who needs it and should not be passed around the whole Bais Haknesses. This would constitute kalos rosh.1
Prepared by R’ Avrohom Yehoshua Ziskind
1Sources: Mishnah Berurah, Shar Hatziyun, Biur Halacha, Dirshu, Piskei Teshuvos