01 - Preheat oven to 350°F. Line two baking sheets with parchment paper.
02 - In a medium bowl, whisk together flour, baking soda, and salt. Set aside.
03 - In a large bowl, cream the butter, granulated sugar, and brown sugar together until light and fluffy, approximately 2 minutes.
04 - Beat in eggs one at a time, then add vanilla extract and sourdough discard, mixing until smooth.
05 - Gradually add the dry ingredients to the wet mixture, stirring just until combined.
06 - Fold in chocolate chips and nuts, if using.
07 - Scoop tablespoon-sized balls of dough onto the prepared baking sheets, spacing them 2 inches apart.
08 - Bake for 10 to 12 minutes, until edges are golden but centers appear slightly underbaked.
09 - Let cookies cool on the baking sheet for 5 minutes before transferring to a wire rack to cool completely.