First I pre‑heated the oven to 325 °F (about 163 °C) and greased a 9‑inch square pan, lining it with parchment paper and leaving the edges hanging for easy lifting.
Next I whisked together the flour, baking soda and salt in one bowl, then in another I beat melted butter with both sugars until combined. I added the egg, egg yolk and vanilla, then slowly mixed in the dry ingredients and stirred in the chocolate chips.
I pressed half the dough into the prepared pan, smoothing it. In a microwave‑safe bowl I melted the caramel squares with heavy cream, stirring every 20 seconds until smooth. I poured the caramel over the dough layer (leaving about ½‑inch border), sprinkled sea salt, then dolloped the remaining cookie dough on top and gently spread it to cover the caramel. I sprinkled more sea salt, baked for approximately 30 minutes until the top was light golden and edges pulled away, then cooled on a rack and refrigerated about 30 minutes to let the caramel fully set.