Preheat the oven to 375 degrees F and line a cookie sheet with parchment paper.
Add the 1 cup butter, 1 cup light brown sugar, and 1 cup granulated sugar to a large bowl. Using a hand mixer, beat on medium until light and fluffy, about 3 mins.
Add the 2 large eggs and 2 teaspoons vanilla extract. Beat until combined.
Add the 2 1/4 cups all-purpose flour, 1/2 cup unsweetened cocoa powder, 1 teaspoon baking soda, and 1/8 teaspoon salt. Beat until the flour is worked into the cookie dough.
Using a small cookie scoop, scoop the cookie dough and place it on the prepared cookie sheet 2 inches apart. I do 3 rows of 4.
Place in the oven and bake for 12 - 14 minutes until done. The edges will be set and the center will be a matte color when they're done.
Let cool on the baking sheets for 5 to 10 minutes before transferring to a cooling rack or paper towel to cool completely. While the cookies are cooling make the topping.
Topping
Add the 1 cup evaporated milk, 1 cup granulated sugar, 4 large egg yolks, and 1/2 cup butter to a medium saucepan. Cook on medium heat for 10-12 minutes stirring frequently so the egg yolks don't become scrambled eggs. Once the sauce thickens remove it from heat.
Stir in 1 teaspoon vanilla extract, 1 1/3 cups sweetened shredded coconut, and 1 cup chopped pecans. Set aside and let cool before adding to the cookies.
Scoop a tablespoon of filling on top of each cookie just before serving.
For just the cookies, place them in an airtight container at room temperature.
For the cookies with topping, place in an airtight container in the fridge.
Notes
Storage: With the coconut caramel topping, the cookies need to be stored in an airtight container in the fridge for up to 5 days.