If you’re using a food processor or stand mixer to make the cookie dough, you can leave your butter cold. If you’re using a hand mixer, room temperature is best. For the cream cheese, room temperature is easier to mix but do know that I forget to warm it up about 100% of the time and just mash it with a fork until soft. It only takes 2 minutes. You will have a little more cream cheese filling than you need but there wasn’t a neat way to downsize it.
2/21/21 Updates: After reading how many struggled with crumbly dough, I’ve retested these a few times this weekend am adding a few notes. Biggest change: I’ve dropped the first flour amount from 2 1/4 cups to 2 cups. I think you will find these much bendier without cracking, so yours will be as perfect as the pictures here.
To 350. Line a large baking sheet with parchment paper.
Make filling: In a small-medium bowl, mash cream cheese and sugar with a fork (this will be easy if room temperature and take a couple minutes longer if it’s cold, but will work either way). Add salt, vanilla, lemon juice, and egg yolk and continue to mash and blend until smooth. Transfer to refrigerator until needed.
Make dough in a food processor: Combine the sugars, salt, and 2 cups of the flour in the work bowl. Add butter and mix or pulse until it disappears, then keep running the machine until it just begins to clump. Add egg and vanilla and beat until combined into one big or a few smaller masses, scraping down the bowl as needed for even blending, then keep running the machine until the dough is smooth and easily forms one big blob. This might take up to a full minute longer.
Make dough in a stand mixer or with a hand mixer: Combine butter, sugars, and salt in the bowl of your stand mixer and beat until creamy. If you began with cold butter in a stand mixer, this will take a couple minutes and require you to scrape down the bowl a few times. Once mixture is thoroughly combined, add egg and vanilla and beat until combined. Add 2 cups of the flour and beat until it disappears, then keep mixing until the dough is smooth and easily forms one big ball; this might take up to a full minute longer. Scrape down the bowl.
All methods: Scoop half the dough into a separate bowl. You can eyeball it, or, if you have a digital scale, my dough halves weighed 308 grams each [new weight based on lower flour amount]. Add remaining 1/3 cup flour to one half of the dough, and 1/3 cup cocoa powder to the second half, mixing until blended. Once again, run the mixer or machine until the dough is no longer crumbly and is in one big mound; this can take 30 to 60 seconds longer. [If using a FP or stand mixer, I mix flour in the half that’s still in the bowl of the machine, scoop it out, add the second half of dough to the machine and blend in the cocoa.]
Marble your dough: Place a large piece of parchment paper on your counter. Spoon little dollops of chocolate and vanilla doughs all over, alternating dollops a little but no need to be very checkerboarded about it. Use an offset spatula, bench scraper, or even a spoon to smoosh and mush some of the pieces together, creating areas that are more blended and leaving some unblended.
Roll dough out: Cover with a second sheet of parchment paper and roll doughs out into an even 1/8-inch thick slab. If you started with cold butter, the dough will probably be solid enough right now to skip it. If it feels very mushy/warm, however, slide the onto the back of a large baking sheet and pop into the freezer (or, uh, outside if it’s cold but not snowing where you are) for 3 minutes. We do not want the dough to be hard, just somewhat firmed up but still very bendy.
Form shapes: Return the dough slab to your counter. Carefully peel the parchment sheet off the top and replace it. (This loosens it.) Flip slab over onto the loosened side and remove the top parchment sheet entirely. Use this to line a large baking sheet.
Cut dough into 3-inch rounds. Place a measured 1-teaspoon dollop of cream cheese filling in the center of each. Fold up the edges in 3 sections and pinch the corners closed and [updated to add] continue to pinch/”zip up” the cooking, pinching it closed, until only a marble-to-quarter-sized opening remains. Don’t worry if the center looks underfilled; the cream cheese expands in the oven. Transfer each to the parchment-lined baking sheet. These do not spread, so you can fit them fairly close together on the tray — i.e. 1-2 inches apart.
To reroll scraps, pile them in the center of the piece of parchment paper and place a second sheet on top again. Repeat the process of rolling the dough thin, briefly cooling it, loosening the back, and cutting it into circles until all the dough and about 2/3 the filling is used.
Bake hamantaschen: For 20 to 25 minutes, until pale parts of dough are golden brown. Transfer to cooling rack.
Store: Hamantaschen keep in fridge for up to one week.