In a medium bowl, whisk together flour, baking soda, and salt. Set aside.
In a large bowl, mix melted butter, brown sugar, and granulated sugar until smooth and creamy.
Beat in egg, extra yolk, and vanilla extract until well combined.
Gradually add dry flour mixture to wet ingredients, mixing just until combined (do not overmix).
Fold in chocolate chips (and walnuts if using).
Cover dough and refrigerate for at least 20–30 minutes (this makes cookies thicker and chewier).
Preheat oven to 350°F (175°C). Line baking sheet with parchment paper.
Scoop 1.5 tbsp portions of dough, roll into balls, and place on baking sheet 2 inches apart.
Bake 10–12 minutes, until edges are golden but centers look slightly underdone (they’ll firm up while cooling).
Let cookies rest on tray for 5 minutes, then transfer to cooling rack.
Serve warm for gooey texture or store in airtight container.
Enjoy with a glass of milk!