Preheat your oven to 350°F (175°C). Grease a 9x13-inch baking pan or line it with parchment paper for easy removal.
In a large mixing bowl, cream together the softened butter, brown sugar, and granulated sugar until light and fluffy. Add the egg and vanilla extract, mixing until well combined.
In a separate bowl, whisk together the flour, baking soda, and salt. Gradually add the dry ingredients to the wet mixture, stirring until just combined. Fold in the chocolate chips and chopped pecans if using.
Spread half of the batter evenly in the prepared baking pan. Drizzle half of the caramel sauce over the batter. Spoon the remaining batter on top, spreading it gently to cover the caramel. Drizzle the rest of the caramel sauce over the top.
Bake in the preheated oven for 25-30 minutes, or until the edges are golden and a toothpick inserted in the center comes out with a few moist crumbs.
Allow the bars to cool in the pan for about 10 minutes before transferring them to a wire rack to cool completely. Cut into squares and serve.