Question: Can we crack open nuts and remove peas from pods on Shabbos?
Answer: The Gemara (Beitza 13b) writes that one mustn’t roll grain between one’s fingers to remove its chaff on Shabbos. Such extraction, mefarek, is a tolda of the melacha of dosh, threshing. The Shulchan Aruch (OC 319:6), writes, therefore, that if one wants to eat the grain, one would have to remove the chaff with a shinui such as using one’s fingertips. The Magen Avraham (OC 319:8) and Mishna Berura (319:21) add that this prohibition only applies when the pod or shell is inedible.
There is a machlokes, however, as to what exactly mefarek applies to. According to the Taz (OC 319:4), it only applies when the food is attached to its outside shell such as peas in a pod while the Maharil (quoted in Elya Rabba 319:11) and Pri Megadim (Eshel Avraham, Introduction to 320) write that it applies specifically to loose food, unattached to its shell like peanuts. Following this, R’ Shmuel Wosner (Shevet Halevi 1:81) forbids shelling peanuts on Shabbos.
R’ Yitzchak Yaakov Weiss (Minchas Yitzchak 3:32) follows the Taz, however, and writes that one may shell peanuts right before one wants to eat them. Likewise, R’ Eliezer Waldenberg (Tzitz Elizer 10:24) writes that when it is normal for food to be removed right before it is eaten, there is no prohibition in removing its shell, especially when it’s a hard shell. He was critical of another Rabbi who wanted to prevent shelling peanuts on Shabbos. Thus, pistachio and sunflower seeds, etc. may be opened and eaten on Shabbos (See Mishna Berura 319:24; Igros Moshe OC 1:125).
In conclusion, one may shell loose nuts on Shabbos. Peas may only be removed normally if their pods are edible. Otherwise, they must be removed with a shinui.