Preheat oven to 350°F (175°C) and line a baking sheet with parchment paper.
In a separate bowl, whisk together flour, baking soda, baking powder, and salt.
In the bowl of a stand mixer, or using a hand held mixer, cream together the peanut butter, butter, brown sugar, and white sugar until smooth.
Add the egg and vanilla extract; mix until combined.
Mix in the sourdough discard.
Add the dry ingredients to the wet ingredients and mix until a dough forms.
Scoop dough into 2 tablespoon-sized balls (about 40g each). Place on baking sheet and press gently with a fork in a criss cross pattern.
Bake for about 10-12 minutes, until edges are golden brown and centers still look slightly underbaked.
Cool on the baking sheet for 1–2 minutes before transferring to a wire rack.