Start by preheating your oven to 350 degrees Fahrenheit. Line two baking sheets with parchment paper and set them aside. This ensures the cookies won’t stick when they’re ready to come out of the oven.
In the bowl of a stand mixer or using a hand mixer set to medium speed, whisk together ½ cup softened unsalted butter, ⅔ cup granulated sugar, 1 teaspoon pure vanilla extract, and ¼ teaspoon salt. Mix until the mixture is smooth. Take care not to over-mix; you want it to be creamy and well combined.
Next, add in 1 large egg and 2 tablespoons milk, mixing until everything is combined. Scrape down the sides of the bowl as needed to ensure all ingredients are fully incorporated.
Turn the mixer down to low and gradually mix in 2 tablespoons cornstarch, ½ teaspoon baking powder, ⅓ cup unsweetened cocoa powder, and 1 ¼ cups all-purpose flour. Scrape down the bowl again as needed, making sure everything is mixed evenly.
Continue mixing while adding flour one tablespoon at a time until the dough pulls away cleanly from the sides of the bowl. You might only need to add an additional one or two tablespoons of flour to reach the right consistency.
Shape the dough into 1-inch balls and place them 2 inches apart on the prepared baking sheets. Using your thumb or the back of a teaspoon, make an indentation in the center of each cookie.
Bake the cookies for 9 to 10 minutes or until the edges are just dry. Be careful not to overbake; they will continue cooking while cooling. Once done, remove them from the oven and let them sit on the baking sheet for about 5 minutes before transferring them to a wire rack to cool completely.
While the cookies are cooling, prepare the filling. In a medium saucepan, combine ½ cup heavy cream, ⅓ cup packed light brown sugar, and ¼ cup unsalted butter. Heat over medium until it comes to a simmer.
Allow the mixture to bubble and thicken into a caramel sauce, which should take around 6 to 7 minutes. Avoid stirring continuously, as it needs to thicken properly. Once thickened, remove the pan from heat and stir in ½ teaspoon vanilla extract, ½ cup sweetened shredded coconut, and ½ cup chopped pecans. Let it cool slightly.
Fill the center of each cookie with about 1 teaspoon of the filling mixture. For the finishing touch, melt 1 cup semi-sweet chocolate chips and drizzle over the top of the cookies. Allow everything to set before serving or storing.