Heat the olive oil in a skillet over medium heat and add the shallot and garlic, cooking for 2 minutes until fragrant.
Add the chopped mushrooms and thyme, and cook for 8 to 10 minutes, stirring occasionally, until all the liquid has cooked off and the pan is dry.
Season with the measured 1/4 teaspoon salt and a few grinds of pepper, then let the mixture cool for 10 minutes.
Stir the cream cheese and gruyere into the cooled mushroom mixture until evenly combined.
Preheat the oven to 400°F and line a baking sheet with parchment.
Unroll the puff pastry on a floured surface and cut into 12 squares, about 2.5 inches each.
Spoon about a teaspoon of filling onto the center of each square, then fold two opposite corners up to meet and pinch to seal partway, leaving a small open vent.
Arrange the bites on the baking sheet, brush each with egg wash, and bake for 18 to 20 minutes, until puffed and deep golden across the top.
Let cool on the sheet for 5 minutes before moving to a plate, since the filling stays hot longer than the pastry looks.
Good to Know
Assemble the unbaked bites and freeze on the sheet, then bake straight from frozen adding 4 to 5 extra minutes.