01 - Preheat oven to 350°F. Line two baking sheets with parchment paper.
02 - Whisk together flour, cocoa powder, baking soda, salt, cinnamon, and oats in a medium bowl. Set aside.
03 - Beat softened butter, brown sugar, and granulated sugar in a large bowl until light and fluffy, approximately 2-3 minutes.
04 - Beat in eggs one at a time. Mix in vanilla extract and cooled espresso until fully incorporated.
05 - Gradually add dry ingredients to wet mixture, stirring until just combined. Do not overmix.
06 - Gently fold in raisins, chocolate chips, and walnuts if using.
07 - Drop tablespoon-sized balls onto prepared baking sheets, spacing 2 inches apart.
08 - Bake for 11-13 minutes until edges are set but centers appear slightly underbaked.
09 - Let cookies rest on baking sheet for 5 minutes before transferring to wire rack to cool completely.