Preheat the oven to 200C/180C fan. Cut the chicken thighs into bite-sized pieces and season with salt, pepper and dried thyme.
Heat the oil in a large frying pan over a medium-high heat. Brown the chicken pieces for 3-4 minutes, then remove and set aside.
Add the leeks and onion to the same pan and cook for 5 minutes until soft. Add the garlic and cook for 1 minute.
Sprinkle in the flour and stir well for 1 minute. Gradually add the milk, stirring constantly to avoid lumps.
Crumble in the stock cube and add the water. Stir until the sauce is smooth and thickening.
Return the chicken to the pan and simmer for 5 minutes until the sauce coats the chicken. Transfer to a pie dish.
Unroll the puff pastry and drape it over the pie dish. Trim the edges and crimp with a fork. Cut a small slit in the centre for steam to escape.
Brush the pastry with beaten egg and bake for 25 minutes until golden brown and puffed up.
Serve hot with mashed potato and green vegetables.