Preheat the oven to 400°F (200°C).
In a large skillet, heat the olive oil over medium heat. Add the diced onion and sauté until translucent, about 5 minutes.
Add the minced garlic and sliced mushrooms to the skillet. Cook until the mushrooms are tender, about 5-7 minutes.
Stir in the shredded chicken, frozen peas, dried thyme, salt, and pepper. Cook for another 2 minutes.
Pour in the chicken broth and heavy cream, stirring to combine. Let the mixture simmer for about 5 minutes until slightly thickened. Remove from heat and let cool slightly.
Roll out one sheet of puff pastry on a floured surface to fit your pie dish. Place it in the dish, pressing down gently to fit.
Pour the chicken and mushroom mixture into the pastry-lined pie dish.
Roll out the second sheet of puff pastry and place it over the filling. Seal the edges by crimping with a fork. Cut a few slits in the top to allow steam to escape.
Brush the top with the beaten egg for a golden finish.
Bake in the preheated oven for 25-30 minutes, or until the pastry is golden brown and puffed.
Allow to cool for 5-10 minutes before serving.