01 - Preheat oven to 350°F. Line a small baking dish or sheet pan with parchment paper.
02 - Heat butter and olive oil in a large 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 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 the pecans for 3 to 5 minutes until fragrant and lightly browned. Coarsely chop if desired.
05 - Place the brie wheel in the prepared baking dish. For a wrapped version, lay the brie on the thawed puff pastry sheet, top with onions and pecans, fold the pastry around the cheese, and brush with beaten egg.
06 - Spoon the caramelized onions over the brie wheel and scatter the toasted pecans on top.
07 - Bake for 15 to 18 minutes for an unwrapped brie, or 20 to 25 minutes if wrapped in pastry, until the cheese is soft and beginning to ooze. The pastry should be golden brown if using.
08 - Allow the brie to rest for 5 minutes before serving. Serve warm with crackers or toasted baguette slices alongside.