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 more cream cheese filling than you need but there wasn’t a neat way to downsize it.
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 1/4 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.
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 1/4 cups of the flour and beat until it disappears. 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 325 grams each. 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. [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. Slide 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 and 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 1-teaspoon dollop of cream cheese filling in the center of each. Fold up the edges in 3 sections and pinch the corners closed. 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.