Clean, clean and halve the mushrooms. Peel and finely chop the onion. Heat oil in a pan and fry the mushrooms for about 4 minutes until golden brown. Cook the pasta in boiling salted water according to the instructions on the packet.
After approx. 3 minutes add diced onion to the mushrooms. Dust the mushrooms with flour and deglaze with cream and stock. Let the sauce simmer for about 3 minutes. Wash thyme, dab dry and chop the leaves of 2 stalks coarsely.
Add thyme leaves and season with salt and pepper. Cut the ham into strips and stir lightly into the sauce at the end. Drain the noodles. Arrange noodles and sauce and garnish with thyme.