01 - Preheat the oven to 350°F. Line two baking sheets with parchment paper.
02 - In a medium bowl, whisk together the flour, oats, baking soda, salt, pumpkin pie spice, and cinnamon. Set aside.
03 - In a large bowl, beat the butter, granulated sugar, and brown sugar together until creamy and smooth.
04 - Add the egg and vanilla extract to the butter mixture, beating until combined. Mix in the pumpkin purée.
05 - Gradually add the dry ingredients to the wet mixture, mixing just until incorporated.
06 - Fold in the raisins and walnuts if using.
07 - Drop rounded tablespoons of dough onto the prepared baking sheets, spacing about 2 inches apart.
08 - Bake for 11–13 minutes, or until edges are golden and centers look set.
09 - Cool on the baking sheets for 5 minutes, then transfer to a wire rack to cool completely.