Fry the sausages in a casserole dish over a medium heat and then add the bacon to them. Add the onions and cook and stir until soft.
Meanwhile, warm the oil in a separate frying pan and add the mushrooms. Cook and stir until tender. Transfer the mushrooms to the casserole dish then pour in the stock. Add the carrots and potato, if using. Give a good stir.
Bake in the preheated oven for 20 to 30 minutes covered with tinfoil, to allow the flavours to mix, until the sausage is no longer pink in the centre, the vegetables are tender and the sauce has thickened. Remove from the oven and serve with a sprinkle of thyme if you would like.