Set a cast iron pan (about 9” diameter) in the oven and set to 350°. Let it come to temperature.
Once the oven hits temp, remove the pan from the oven and set over medium heat on the stove for a few minutes to get it hot. Add the oil to the pan and tumble in the mushrooms. Toss them about for a minute or two. I know it seems like not nearly enough oil, but don’t worry—just toss them about to get them slicked in the oil as best you can. After about two minutes put the pan in the oven and let them roast for about 20 – 25 minutes, until they’re roasted and soft.
Meanwhile, set a large pot of water over medium-high heat and bring to a boil, at which point you’ll salt generously and return to a boil.
When the mushrooms have a few minutes left drop the pasta in the boiling water. Cook just shy of what the package instructs for al dente—typically being 9 – 10 minutes, so figure on about 8 minutes.
Once the pasta is dropped and the mushrooms have had their final minutes, remove the pan from the oven and place over low heat. Add the garlic and thyme, stirring to warm it through and seep their flavors onto the shrooms and they become fragrant.
Increase the heat a bit and then deglaze the pan with the vermouth and sherry. Let it simmer for a moment to cook out some of the alcohols taste.
Add about ¼ cup of the pasta water to the pan, at which point the pasta should be about ready. Lift it straight from the pot with a pasta spoon and toss into the pan with the mushrooms. Toss the spaghetti about to coat it in the woodsy sauce, letting it absorb most of the liquid to take it to the perfect al dente bite—about 2 – 3 minutes. What you’ll be left with is a scant, but flavorsome, starchy liquid. Shut off the heat and stir in the butter, letting it melt, creating a luxurious and velvety sauce.
Check for seasoning, adding salt if needed, scatter with parsley and transfer to a warm bowl (if you can be bothered) before digging in right away.
You could just as easily sub the sherry for dry Marsala—it would be slightly more robust.
A variety of mushrooms would work, too. Keep in mind that the thinner or more delicate mushrooms, like oyster or enoki, won't need nearly as long to roast. Just add them to the pan in the last half or third of their time in the oven and toss them a bit.