Preheat oven to 350°F (175°C) and line two baking sheets with parchment paper or silicone baking mats.
In a medium bowl, whisk together the flour, baking soda, baking powder, cinnamon, pumpkin pie spice, and salt for about 20 seconds.
In a large bowl, beat the softened butter, granulated sugar, and brown sugar on medium speed for 2 minutes until pale and fluffy, scraping down the sides halfway through.
Add the pumpkin puree, egg, and vanilla extract and beat on medium speed for 1 minute until fully combined. The mixture may look slightly curdled, which is normal.
Add the dry ingredients to the wet ingredients in two additions, mixing on low speed after each until no streaks of flour remain. Do not overmix.
Fold in the chocolate chips and walnuts (if using) by hand with a rubber spatula until evenly distributed.
Use a medium cookie scoop to portion the dough into 2-tablespoon balls, spacing them 2 inches (5cm) apart on the prepared baking sheets.
Bake one sheet at a time on the middle rack for 10 to 12 minutes, until the edges look set and the centers still look slightly underdone.
Let the cookies rest on the baking sheet for 5 minutes, then transfer to a wire cooling rack to cool completely before storing.