Preheat the oven to 350°F and line 4 baking sheets with parchment paper.
Whisk together the flour, baking soda, salt, cinnamon, allspice, and nutmeg, and set aside.
Beat the butter and sugars until light and creamy. Add the vanilla, squash puree or canned pumpkin, and the egg, and beat until smooth. Add the flour mixture in two batches, and mix until it’s just barely incorporated. Fold in the chocolate chips and walnuts.
Drop the cookie dough onto the prepared baking sheets by the tablespoon, 3 inches apart. Press them down with the side of your palm until they are roughly 1/4 inch thick. Sprinkle each cookie with a few grains of coarse salt.
Bake the cookies for about 20 minutes, until the edges are crisp and the bottoms are golden. Cool on a rack, and store in an airtight container for up to 5 days.