Blanch the green beans: Bring 12 to 14 cups (~3 L) of water to a boil in a large saucepan (5 quart or larger), then add 2 ½ TBSP (24g) kosher salt. Add the green beans and cook for 3 minutes (4 for fatter beans), or until bright green and partially tender. Drain, rinse under cold water for 1 minute or until room temperature, and shake dry. Trim the ends and halve the beans (cut into thirds for large ones).
Prep: Preheat the oven to 375ºF/190ºC with a rack in the top third of the oven. Lightly grease a 3-quart / 3L (13”x9”) baking dish and add the green beans.
Prep the mushrooms: Wipe clean with a dry cloth. Slice cremini and shiitake varieties, removing shiitake stems. For oyster or maitake, tear into pieces, leaving smaller ones whole.
Cook the shallots: Heat a large frying pan over medium heat with 1 ½ TBSP (21g) olive oil until shimmering. Add the shallots and a pinch of salt. Stir occasionally until the edges brown, 5 to 6 minutes.
Cook the mushrooms: Now add the remaining 1 ½ TBSP (21g) oil and mushrooms to the pan. Increase the heat to medium-high. Stir occasionally for 2 to 3 minutes, then place a cast iron skillet on the mushrooms. Press for 1 minute to release their liquid, then remove the pan and stir occasionally until the liquid evaporates and the mushrooms are golden brown, another 4 to 6 minutes. Add the garlic, thyme, ¼ tsp kosher salt, and pepper to taste. Stir frequently for 1 minute, until fragrant. Pour in the white wine, scrape up any browned bits, and simmer rapidly for 4 minutes, or until the wine smell fades.
Combine: Transfer the mushroom mixture to the dish with the beans. Rinse out the pan for the sauce (or use a medium saucepan).
Make the miso slurry: Using a fork or whisk, whisk the miso with 2 to 3 TBSP warm water until miso is dissolved, then stir in the soy sauce. Set aside.
Make the sauce: Add the butter to the cold frying pan (or saucepan) and set over medium-low heat. Once melted, add the flour and whisk constantly for 60 to 90 seconds. Gradually pour in the milk in stages, whisking as you go to minimize clumps. Whisk in the miso-soy slurry. Bring the sauce to a gentle simmer and stir frequently until a bit thicker than spoon-coating, 3 to 4 minutes.
Assemble: Pour the sauce over the beans and mushrooms and toss to coat very well.
Bake uncovered at 375ºF/190ºC until the edges bubble, 15 to 18 minutes. Scatter the fried onions on top, pressing them in gently so they don’t just float. Bake 8 to 10 minutes more, until the sauce bubbles throughout and the onions are deep golden brown. Cool for 10 minutes before serving.
