01 - Preheat oven to 350°F. Position the rack in the center.
02 - Melt butter with olive oil in a skillet over medium-low heat. Add the thinly sliced onions and cook for 15 to 20 minutes, stirring frequently, until deeply golden and very soft.
03 - Stir brown sugar, thyme leaves, salt, and pepper into the onions. Continue cooking for 2 to 3 minutes until fully caramelized and glossy. Remove from heat and set aside.
04 - Place pecans in a dry skillet over medium heat. Toast for 3 to 5 minutes, tossing occasionally, until fragrant and lightly browned. Chop coarsely if desired.
05 - Place the brie wheel in a small oven-safe baking dish. If using puff pastry, lay the thawed sheet flat, set the brie on top, and proceed to the next step before wrapping.
06 - Spoon the caramelized onions evenly over the brie and scatter toasted pecans on top. For the wrapped version, fold the puff pastry over the topped brie, seal the edges, and brush with beaten egg.
07 - Bake uncovered for 15 to 18 minutes until the cheese is soft and beginning to ooze. If wrapped in pastry, bake 20 to 25 minutes until the crust is deep golden brown.
08 - Allow the baked brie to rest for 5 minutes. Serve warm alongside crackers or toasted baguette slices.