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 thinly sliced onions and cook for 15 to 20 minutes, stirring frequently, until deeply golden and very soft.
03 - Stir in brown sugar, thyme leaves, salt, and pepper. Continue cooking for 2 to 3 minutes until the onions are fully caramelized and glossy. Remove from heat and set aside.
04 - In a dry skillet over medium heat, toast pecan halves for 3 to 5 minutes 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 pastry sheet flat, place the brie in the center, top with caramelized onions and pecans, fold the pastry around the cheese, and brush the surface with beaten egg.
06 - Spoon the caramelized onions over the brie and scatter toasted pecans on top. Bake for 15 to 18 minutes for an unwrapped wheel, or 20 to 25 minutes if wrapped in pastry, until the cheese is softened and beginning to ooze.
07 - Allow the baked brie to rest for 5 minutes before serving. Serve warm with crackers or toasted baguette slices.