A fundamental rule establishes that if one eats two foods, one of which is secondary to the other, as it serves merely to enhance the other food’s taste, then he recites just one Beracha, over the primary food, and this Beracha covers both foods.
One example of this principle is sweet noodle kugel, a popular food among Ashkenazim, which is sometimes eaten with a sour pickle in order to offset the sweet taste of the kugel. In such a case, the pickle is clearly secondary to the kugel, as it is eaten only to enhance the kugel. Therefore, one would recite only "Mezonot" over the kugel, and this Beracha covers also the pickle. Likewise, one who eats a cracker with jam spread on it recites only "Mezonot" over the cracker, and this Beracha covers also the jam.
The Mishna Berura (Rav Yisrael Meir Kagan of Radin, 1839-1933) notes that this applies only if one intended to eat the secondary food at the time he recited the Beracha over the primary food item. Thus, for example, if a person was served a piece of kugel, and after he recited a Beracha and started eating, a pickle was brought, he would need to recite "Ha’adama" over the pickle. Since he did not have in mind to eat the pickle when he recited the Beracha over the kugel, the pickle was not covered by the Beracha, and it therefore requires its own Beracha. Similarly, if after a person recited "Mezonot" over a cracker and started eating, he was given jam, he must recite a Beracha over the jam, since he did not have it in mind when he recited the Beracha over the cracker.
Hacham David Yosef (contemporary), in Halacha Berura, advances a different view. He maintains that even if one did not have the secondary food item in mind when he recited the Beracha over the primary item, it does not require a separate Beracha, since it is eaten as part of the primary food. The only exception to this rule, Hacham David writes, is where one would not have been interested in the secondary food even if it had been available when he recited the Beracha, but he then changed his mind once it was brought. In this instance, where one specifically did not want the secondary food item – such as if one wanted to eat crackers specifically without jam – but then changed his mind, he must recite a Beracha on the secondary item. Otherwise, the secondary food item does not require a Beracha even if one did not have it in mind when he recited a Beracha over the primary food item.
In practice, it is preferable to satisfy both opinions in such a case, and try to find a different food requiring the same Beracha as the secondary food item, so one can recite the Beracha over that other food which would cover also the food in question.
Summary: If one recites a Beracha over a cracker and starts eating, and afterward jam is brought and spread on the cracker, then according to some views, he must recite a Beracha over the jam, since he did not have it mind when he recited the Beracha over the cracker. Others maintain that he does not recite a Beracha in this case, unless he specifically would not have wanted jam when he recited the Beracha over the cracker, but has since changed his mind.