Preheat the oven to 200°C (400°F) and line a baking tray with parchment paper.
Melt the butter in a large skillet over medium heat and add the sliced onions. Cook gently until soft and caramelized, about 20 minutes.
Once caramelized, season the onions with salt, pepper, and dried thyme. Remove from heat and allow to cool slightly.
In a bowl, mix the sausage meat with the cooled onions until well combined.
Roll out the puff pastry on a lightly floured surface and cut into large rectangles.
Place a generous spoonful of the filling onto one side of each pastry rectangle, then fold over and seal the edges with a fork.
Beat the egg and brush it over the top of each roll for a golden finish.
Bake in the preheated oven for 20-25 minutes or until golden brown and puffed up.
Remove from the oven and allow to cool on a wire rack before serving.