In large bowl, whisk together flour, cornstarch, salt, baking powder, and baking soda until well combined; set aside.
In a separate large bowl, beat together brown sugar, granulated sugar, and 1 cup butter with an electric mixer on medium speed until well combined. Add egg, egg yolks, and 2 teaspoons vanilla, and beat until well combined.
Beat flour mixture into wet mixture until combined. Stir in melted chocolate, cinnamon, additional 2 teaspoons vanilla,almonds, and ancho chile pepper (if desired). Using a small ice cream scoop (about 2 teaspoons), ball up dough. Place on lined baking sheets (parchment, wax, or silpats), cover dough with plastic wrap, and refrigerate 2-3 hours, or overnight, or up to 2-3 days.
Preheat oven to 325 degrees F. Bake cookies in batches about 13-16 minutes or until slightly browned around edges.
Meanwhile, beat together cajeta (or caramel), butter, and 1 cup powdered sugar with electric mixer on medium speed. Beat in additional powdered sugar until desired consistency and sweetness.
Spread filling between 2 cookies.
SNAPPY TIPS: I strongly suggest refrigerating the dough for best results and not baking right away. You can make a big batch of the basic dough then use it for other upcoming recipes. Make sure the cajeta/caramel you use is very thick, otherwise, the filling may be too runny. Instead of making "sandwiches" you can also use the filling to frost the cookies.SNAPPY SUBSTITUTIONS: I do not suggest substituting margarine for butter, or whole eggs for the egg yolks. Results will vary a lot the more you substitute. You could use any variety of chocolate in these cookies, but I prefer the dark chocolate.