The Talmud in several places takes up the question of whether mitzvot require intent (kavanah) in order to be considered fulfilled. For example, if one is forced to eat matzah on Pesach, or one blows a shofar on Rosh HaShanah out of musical interest, the mitzvah would be considered accomplished if kavanah is not necessary.
Authorities consider the issue of what it would mean if it is assumed that kavanah is not necessary. One the one hand, it might mean just that, that intent is not required for mitzvot, and the action is all that is necessary. Alternatively, it may mean that intent actually is necessary, but that in normal situations, intent is implied in the action. This would perhaps follow the model found in sacrifices, where the proper purpose is considered to be implied, in the absence of any contradictory factors, or “stama l’shmah” (Zevachim 2a). Indeed, the Noda B’Yehudah in a well-known responsum (Kama, Y.D. 93) argues against the practice of reciting “L’sheim yichud....” before a mitzvah, in that it undermines stama l’shmah.
This directly impacts upon a question dealt with by rishonim. Presuming active kavanah is not necessary, would that still be true if the individual actively intends not to fulfill a mitzvah? Many rishonim assume that “negative kavanah” can cancel a mitzvah (See Talmidei Rabbeinu Yonah, Berakhot, 12a) and that it is routinely used, for example, to ensure that the mitzvah of lulav is not performed before conditions are optimal (see Tos. Sukkah 39a. and Rosh 3:33, Tur O.C. 651, Beit Yosef O.C. 589 citing Ran, and Ohr Zarua Hil. Lulav 313). Other Rishonim disagree, and assume that negative kavanah has no effect on mitzvah fulfillment (Ra’ah, cited in Beit Yosef, and Ritva, Rosh HaShanah 28a). [See also Atvan D’Orayta, 23, and Resp. Ben Porat I, 9:5; Resp. Minchat Elazar (I, 38); Siach HaSadeh (Kogaglover Rav, Sha’ar Birkhat Hashem, 1); and Resp. Divrei Yoel (155).
Assuming that some intent is inherent in the mitzvah might lead one to distinguish between mitzvot d’orayta, which many acharonim believe to have inherent status, and mitzvot d’rabbanan, which may not. However, it is the opposite perspective that is more frequently cited: the Magen Avraham (O.C. 60:3) quotes the Radbaz (I, 37) that mitzvot d’orayta need kavanah while mitzvot d’rabbanan do not. (The inverse position is found, though, in the S’dei Chemed (ma’arekhet ha-mem, klal 64, citing Resp. Ramatz).
Alternatively, if inherent kavanah is a function of individual behavior, that may explain the view that mitzvot do not need kavanah if an action is involved, but mitzvot fulfilled without an action do need kavanah. This view is found in the Magid Mishneh (Hil. Shofar 2:4) and the Pri Chadash (O.C. 474:4).
However, even if kavanah is not required, the possibility exists that ideally, l’chatchilah, kavanah is obligatory, even though mitzvot can be fulfilled without it (the S’dei Chemed, ma’arekhet ha-mem, 76, cites a dispute on this point). The Shulchan Arukh (O.C. 60:4) brings both opinions on the kavanah question, and then rules that kavanah is necessary. The Chayyei Adam (68:9) limits this requirement to situations where it is unclear that kavanah could be otherwise assumed. The Misnah Berurah (60:10), however, assumes this reasoning to be b’dieved, and that l’chatchilah, kavanah is necessary. Some opinions [see Meiri, petichah, p. 18, cited in Iyunim B’Halakhah, II, 6; and Kovetz Ha’arot, 36:4] go so far as to say that even the opinon that kavanah is not necessary only refers to technically discharging the obligation; the individual, though, would receive no personal credit for the accomplishment. The Resp. D’var Yehoshua (I, 15:7) notes, based on a comment of the Ramban (Sefer HaMitzvot, 5), that in addition to basic kavanah, there is an initial need to have full awareness and devotion to fulfill G-d’s will.
It should be pointed out that the comparison of the concept of “l’shmah” from sacrifices (and sifrei Torah, gittin, etc.) to “kavanah” by mitzvot is not necessary a perfect one. As many achronim point out (see Zecher Yitzchak, 5; Resp. S’ridei Eish, II, Y.D. 62; Birkhat Shmuel, Gittin, 10), l’shmah refers to an object or situation being prepared specifically with the intended purpose, while kavanah is an aspect of the individual’s awareness and intent. This distinction may be relevant to the question of whether kavanah, if necessary, is sufficient if present the beginning of the mitzvah (see Resp. Minchat Shlomo, I, 1) or if it must be active during the entire process (as assumed by Chiddushei R. Chaim HaLevi, Hil. Tefilah ch. 4, and Resp. D’var Yehoshua, I. 15:6; see Iyunim B’Halakhah, I, 5). In the area of sacrifices and related concepts, there is a principle (kol ha-oseh al da’at rishonah oseh) that initial intent is sufficient; however, if there is a distinction to be made between kavanah and l’shmah, it is unclear that this principle would be transferable to kavanah for mitzvot.