01 - Preheat the oven to 350°F. Line two baking sheets with parchment paper.
02 - In a medium bowl, whisk together gluten-free flour blend, baking soda, baking powder, sea salt, and instant espresso powder. Set aside.
03 - In a large bowl, beat softened butter, light brown sugar, and granulated sugar together using an electric mixer until light and creamy, about 2 minutes.
04 - Add eggs one at a time to the creamed mixture, mixing well after each addition. Stir in pure vanilla extract.
05 - Gradually add the dry ingredients to the wet mixture, mixing on low speed until just combined.
06 - Fold in dark chocolate chunks and chopped walnuts or pecans if using.
07 - Scoop tablespoon-sized portions of dough onto the prepared baking sheets, spacing about 2 inches apart.
08 - Bake in the preheated oven for 10 to 12 minutes, or until the edges are set and centers appear slightly underbaked.
09 - Allow cookies to cool on the baking sheet for 5 minutes, then transfer to a wire rack to cool completely.