Preheat the oven to 475°F.
Line baking sheets with parchment paper.
Whisk the flour, cornstarch, salt, and baking soda together in a small bowl.
Cut the cold butter into small pieces.
In a large bowl, combine the butter, granulated sugar, brown sugar, egg, and vanilla.
Gently stir the dry ingredients into the butter mixture until combined.
Fold in the chocolate chips and optional walnuts.
Scoop tablespoon-size balls of dough onto the prepared baking sheets.
Bake for 6 to 7 minutes, until the tops are golden brown.
Remove from the oven and let the cookies cool on the baking sheet; the centers continue cooking as they cool.
For the softest texture, serve the cookies warm rather than fully cooled.