Preheat your oven to 350°F. Line baking sheets with parchment paper and set aside.
In a large mixing bowl, combine the melted butter, brown sugar, granulated sugar, and peanut butter. Stir until smooth and well combined.
Add the sourdough discard, egg yolks, and vanilla extract. Stir until the mixture is well combined.
In a separate medium bowl, whisk together the flour, baking soda, baking powder, and salt.
Gradually add the dry ingredients to the wet ingredients. Stir until fully combined, making sure to scrape the sides and bottom of the bowl so no dry pockets remain.
Scoop the dough into 2 tablespoon sized balls. Place them on the prepared baking sheets, spacing them about 2 inches apart.
Use a fork to gently press a criss-cross pattern into each cookie. Lightly sprinkle the tops with sugar.
Bake on the center rack for 8 to 10 minutes. The cookies should look slightly underbaked in the center when you take them out.
Let the cookies cool for 5 minutes on the baking sheet before moving them. They will set up as they cool and stay soft inside.