Preheat the oven to 400°F.
In a large, heavy based saucepan, heat the oil. Put the flour into a large oven tray and lightly dust the beef pieces, shaking off and reserving any excess flour. When the oil is smoking hot, cook the meat in batches so as not to crowd the pan. When evenly seared remove each piece from the pan and place on a plate while you repeat the process and sear the rest of the meat. Add the butter to the pan and then add the onions, thyme and garlic and sauté over a low heat until translucent but not colored. Turn up the heat and add the mushrooms, and the reserved flour stirring thoroughly. Once the mushrooms are softened, transfer the meat back into the saucepan along with the beef stock and salt and pepper and bring to the boil. Turn down the heat, cover and simmer for about 1.5 hours or until the meat is tender. Once cooked, remove all the meat and vegetables from the saucepan using a slotted serving spoon and transfer to a pie dish. Bring the saucepan back to the boil and reduce the liquid until you have about 1 ½ cups remaining. Add this to the meat and stir through thoroughly. Set aside and allow to cool.
Once completely cooled, add the oysters to the pie dish and cover with the sauce. Rollout the puff pastry on the bench and cut around the edges making sure that the pastry is about ½ inch wider than the dish. Lay the pastry over the pie dish and crimp the edges. Cut a cross in the middle of the pie to allow steam to escape when cooking. Brush the pastry with the beaten egg and cook in the oven for about 30–45 minutes. Serve with creamy herb mash potato.