Mix together the flour, salt and pepper in a large bowl.
Add in the beef cubes and toss until well coated.
Heat the oil in a large pot on a high heat, and brown the steak well on all sides. Remove and set to one side.
Turn the heat to medium, add in the onions, mushrooms and garlic, and cook until softened. Remove from the pot and set to one side.
Turn the heat back up to high and pour in the wine. Use a wooden spoon to scrape up the bits on the bottom of the pot (deglaze) and reduce the wine to half.
Add the steak and vegetables back to the pot, pour over the stock and stir everything together.
Bring the pot to a boil, the let it simmer on a medium heat, uncovered, for 2 hours, stirring occasionally.
While the filling is simmering, make the pastry.
Place the flour and pepper into a large bowl and rub in the butter until you get breadcrumbs. Mix in the egg to make a dough. If the dough is too dry, you can add in a little water. Make a ball with the dough, cover with plastic wrap and chill until ready to use.
After two hours, stir in the stilton and fresh thyme leaves.
Mix the cornstarch with 2 tablespoons of water to make a slurry and stir that into the stew. Take the pot off of the heat.
Preheat the oven to 400f / 200c.
Roll out the pastry dough into an even thickness, large enough to cover your pie dish.
Transfer the filling into your pie dish and place the pastry over the top. Trim the edges.
Beat the egg together and brush over the top and make some incisions in the top of the pastry with a sharp knife to allow the steam to escape.
Bake for 40 minutes until the pastry is golden brown.
Let sit for 10 minutes before slicing and serving.