In the bowl of a stand mixer fitted with the paddle attachment, beat the butter, brown sugar, and granulated sugar together on medium-high speed for 5–7 minutes, until light and fluffy.
Add eggs and flavorings
Mix in the eggs and vanilla, one at a time, for about 1 minute. Add the molasses and mix for another minute until fully incorporated.
Combine dry ingredients
In a separate bowl, whisk together the flour, cocoa powder, espresso powder, cornstarch, baking soda, baking powder, and salt.
Bring it all together
Slowly add the dry ingredients to the wet mixture and mix on low speed for 2–3 minutes, or until just combined.
Chill the dough
Cover the dough and refrigerate for at least 2 hours (or overnight). This step is key for developing flavor and preventing the cookies from spreading too much.
Bake
Preheat the oven to 325°F. Scoop dough and place on a parchment-lined baking sheet.
Large cookies: bake 12–14 minutes
Smaller cookies: bake 9–11 minutes
The edges should look set while the centers remain soft.
Cool & enjoy!
Let the cookies cool on the baking sheet for 5 minutes before transferring to a wire rack.