Preheat your oven to 325°F. Line a large rimmed baking sheet with unbleached parchment paper and set it aside.
In a large bowl, place the flour, xanthan gum, cornstarch, cocoa powder and salt, and whisk to combine well.
Add the brown sugar, and mix to combine and work out any lumps.
Create a well in the center of the dry ingredients, and add the butter, egg and vanilla, and mix and press the dough until it comes together. It will be thick but soft.
Scoop the dough into heaping tablespoons with a #50 cookie scoop or two spoons and place about 1 1/2-inches apart on the prepared baking sheet.
Roll each piece of dough into a round between the slightly moistened palms of your hands.
Press the moistened bowl of a 1/2 teaspoon (or your thumb, moistened) into the center of each disk, about 3/4 of the way to the bottom of the dough. If the dough begins to stick to the teaspoon or your thumb, moisten it in between each cookie. If the edges split, press the back together gently.
Place the baking sheet in the refrigerator for about 15 minutes or the freezer for 5 minutes or until mostly firm to the touch. This will help the cookies keep their shape during baking.
Place the cookies in the center of the preheated oven and bake for 10 minutes, or until the cookies are puffed and set (they will not glisten when they’re baked like they do when they’re raw).
Remove the cookies from the oven, and press the thumbprint depressions again with the bowl of a 1/2 teaspoon if any have puffed up too much during baking.
Allow to cool for about 5 minutes on the baking sheet, and transfer to a wire rack to cool completely.
Make the (optional) caramel filling.
In a small, heavy-bottom saucepan, place the granulated sugar, cream of tartar and water, and mix to combine well.
Place the saucepan over medium-low heat, and cook until the mixture is beginning to turn amber in color (to ensure that you do not burn the sugar, clip a candy thermometer to the side of the saucepan and remove it from the heat when the sugar mixture reaches 300°F).
Remove the pan from the heat and, whisking constantly, slowly add the cream. The mixture will bubble fiercely. Keep stirring until the mixture stops bubbling and is smooth.
Add the butter and salt, and whisk to combine well. Pour the caramel into a separate heat-safe bowl or jar, and allow to cool while you make the cookies. It will thicken as it cools.
Make the (optional) chocolate filling.
Place the chopped chocolate and 2 tablespoons virgin coconut oil in a small, heat-safe bowl. Place the bowl over a small pot of simmering water, taking care to ensure that the bowl does not touch the water.
Heat, stirring occasionally until the mixture is melted and smooth. Remove the chocolate mixture from the heat and allow it to cool for about 5 minutes or until it just begins to thicken.
Fill the cookies.
Once the cookies are cool, fill the thumbprint depressions with the cooled caramel or the warm chocolate filling, sprinkle immediately with chopped pecans and drizzle with the (optional) melted chocolate.
Allow the cookies to sit at room temperature until set (about 45 minutes—less if you refrigerate them).