Trim the mushrooms as necessary. Leave small mushrooms whole and split or quarter larger mushrooms into bite-sized pieces.
Heat the olive oil in a large wok or 12-inch skillet over high heat until shimmering. Add the mushrooms and thyme or rosemary, if using. Season with salt and pepper and cook, tossing or stirring occasionally, until the mushrooms have released their moisture and are deeply browned, 6 to 10 minutes depending on the variety and heat source. If the pan looks dry before the mushrooms are well browned, add another splash of olive oil.
Add the shallot or onion and cook, stirring and tossing, for about 30 seconds. Add the garlic and cook until fragrant, about 15 seconds longer.
Add the lemon juice and soy sauce and toss to combine. Add the chicken stock, heavy cream, and butter. Bring to a vigorous simmer and cook until the liquid has reduced slightly and begins to look saucy. Reduce the heat to low while the pasta finishes cooking.
Meanwhile, bring a medium to large pot of well-salted water to a boil. Add the pasta and cook until just shy of al dente (a minute or two less than the package directions). Before draining, reserve at least 1 ½ cups (350ml) pasta cooking water.
Using a metal spider, add the pasta directly to the wok or skillet, bringing along whatever cooking water clings to it. Increase the heat to high and cook, stirring and tossing constantly, until the pasta is al dente and the sauce is glossy and coats each piece, 1 to 2 minutes. Add pasta water a few tablespoons at a time as necessary. The sauce should look a little looser than you think it needs to; it will continue to tighten as the pasta sits and as you add the cheese.
Remove from heat and discard any herb sprigs. Add the pecorino and parsley or chives and toss vigorously until the cheese melts into the sauce. Add more pasta water as necessary to maintain a loose, creamy consistency.
Taste and season with additional salt, pepper, or lemon juice as desired. Serve immediately with additional pecorino at the table.
