Preheat your oven to 350°F (175°C) and line baking sheets with parchment paper.
In a large mixing bowl, cream together the softened butter, brown sugar, and granulated sugar until light and fluffy, about 3-4 minutes.
Beat in the eggs, one at a time, ensuring each is fully incorporated before adding the next. Mix in the vanilla extract.
In a separate bowl, whisk together the all-purpose flour, cocoa powder, baking soda, and salt until well combined.
Gradually add the dry ingredients to the wet mixture, stirring until just combined—do not overmix.
Fold in the chocolate chips and chopped walnuts (if using), ensuring they are evenly distributed throughout the cookie batter.
Using a tablespoon or cookie scoop, drop heaping scoops of cookie dough onto the prepared baking sheets, allowing space between each cookie as they will spread.
Bake in the preheated oven for 10-12 minutes, or until the edges are set but the centers appear slightly underbaked for a chewy texture.
Remove from the oven and let the cookies cool on the baking sheet for 5 minutes before transferring them to a wire rack to cool completely.
Notes
For a chewier texture, do not overbake the cookies.