Preheat the oven: Preheat to 350°F (175°C) and line baking sheets with parchment paper.
Whisk the dry ingredients: In a medium bowl, whisk together the flour, oats, cornstarch, baking powder, baking soda, cinnamon, and salt.
Cream the butter and sugar: In a large bowl or stand mixer, beat the room temperature butter and brown sugar until light and fluffy.
Add wet ingredients: Mix in the egg, extra egg yolk, and vanilla extract until well combined, scraping down the sides as needed.
Mix in the discard: Gently fold the sourdough discard into the wet mixture.
Combine wet and dry: Gradually add the dry ingredient mixture to the wet ingredients, mixing just until no flour streaks remain.
Fold in the mix-ins: Use a spatula to stir in the chocolate chips, chopped pecans, and shredded coconut.
Chill the dough: Cover the bowl and refrigerate the dough for at least 30 minutes to prevent the cookies from spreading too much.
Scoop and bake: Drop rounded tablespoons of dough onto the prepared baking sheets. Bake for 10-12 minutes, or until the edges are golden brown but the centers are still soft.
Cool: Let the cookies rest on the baking sheet for 5 minutes before transferring to a wire rack to cool completely.
Keyword cowboy cookies, sourdough cowboy cookies, sourdough discard cowboy cookies