Preheat oven to 350 F. Prepare a baking sheet by either spraying with baking spray, lining with parchment paper, or a silicone baking mat.
With an electric mixer using a paddle attachment, combine the butter, white sugar and brown sugar and beat on high speed until mixture is light and fluffy, approximately 3 minutes, scraping the sides of the bowl occasionally.
Add eggs, vanilla, and salt and mix well on medium speed. Add chocolate pudding mix and cocoa powder and mix on low speed until combined.
Add baking soda and flour, mix on low speed until combined.Using a 2 inch or ⅓ cup cookie scoop, drop 6-8 onto prepared baking sheets.
Bake at 350 F° for 12-13 minutes. Let cool before frosting.
For the frosting:
In a saucepan over medium heat combine butter, brown sugar, milk, egg, and salt. Whisk until smooth and bring to a simmer. Cook 2-3 minutes until thickened, stirring constantly.
Remove from heat and add vanilla, coconut, and pecans. Allow to cool 10 minutes before scooping onto cookies, serve warm.
Notes
May be stored in an airtight container for 2-3 days.