01 - Set the oven temperature to 400°F (200°C) and allow it to fully preheat.
02 - In a large skillet over medium heat, melt the butter. Add onion, carrots, and celery and cook for 5 to 7 minutes until softened.
03 - Stir in minced garlic and cook for an additional 1 minute.
04 - Sprinkle flour over the vegetables and stir continuously for 2 minutes to create a roux.
05 - Gradually pour in chicken stock and milk while stirring constantly to avoid lumps. Bring to a simmer and cook until thickened, approximately 5 minutes.
06 - Add shredded chicken, frozen peas, parsley, thyme, salt, and pepper. Mix thoroughly and simmer for 2 to 3 minutes, then remove from heat.
07 - Transfer the chicken mixture into a 9-inch (23 cm) deep pie dish, spreading evenly.
08 - Unroll the puff pastry and place it over the filling. Trim excess pastry and crimp edges to seal. Cut small slits on top to allow steam to escape.
09 - Brush the pastry surface evenly with the beaten egg for a golden finish.
10 - Place the pie in the oven and bake for 25 to 30 minutes until the pastry is golden brown and crisp.
11 - Remove from oven and let rest for 5 minutes before serving to allow filling to set.