Bring a large pot of salted water to a boil and cook the spaghetti according to package directions until al dente. Drain and set aside.
While the pasta cooks, slice the mushrooms, cut green onions into 1/2" pieces, julienne or matchstick the carrots, and mince the garlic. If using ginger, grate it now.
Heat a large skillet or wok over medium-high heat. For an oil-free method, add 1–3 tablespoons water or broth; otherwise add toasted sesame oil if using. Add the sliced mushrooms and sauté 2–3 minutes until they begin to soften.
Add the snow peas, carrots, and green onions to the skillet and cook about 5 minutes, stirring, until the vegetables are crisp-tender.
Reduce heat to medium, add the minced garlic (and grated ginger if using), and sauté for about 1 minute until fragrant.
Add the cooked spaghetti and tamari to the skillet. Toss thoroughly to combine and heat through for 2–3 minutes, adjusting tamari to taste.
Remove from heat, sprinkle with sesame seeds and/or mung bean sprouts if desired, and serve warm or chilled.