Cream Butter and Sugar
In a large bowl, beat softened butter, granulated sugar, and brown sugar together until light and fluffy, about 2–3 minutes (by hand, stand mixer, or hand mixer).
Add Wet Ingredients
Add egg yolks one at a time, mixing well after each.
Stir in vanilla extract.
Add sourdough discard and mix until fully combined with no visible streaks.
Add Dry Ingredients
In a separate bowl, whisk together flour, baking powder, baking soda, salt, and cornstarch (if using).
Gradually fold dry mixture into wet ingredients with a spatula until just combined — do not overmix.
Dough will be slightly soft and tacky; this is normal.
Rest the Dough
Let dough rest 10 minutes at room temperature so the flour fully hydrates.
For best results, cover and refrigerate 30 minutes to overnight for thicker, more flavorful cookies.
Preheat and Scoop
Preheat oven to 350°F (175°C).
Line baking sheets with parchment paper.
Scoop dough into balls using a 2–3 tbsp cookie scoop.
Roll each ball in granulated sugar for a sparkly, slightly crisp exterior.
Place 2–3 inches apart on prepared baking sheet.
Bake
Bake 12–14 minutes until edges are set and lightly golden; centers should still look slightly underdone and soft.
Do not overbake — cookies firm up as they cool.
Sprinkle with flaky sea salt immediately out of the oven if desired.
Cool and Serve
Let cookies cool on the baking sheet 5 minutes, then transfer to a wire rack.
Cookies reach their final soft, chewy texture once fully cooled.