Preheat oven to 375.
Slice the spaghetti squash lengthwise and scoop out all of the seeds with a spoon. Brush with avocado oil to coat and sprinkle with salt and pepper.
Place the squash in a large casserole dish with the skin side down and roast for 45-50 minutes.
Mix all ingredients for the sauce and set aside.
Cut the ends off of the eggplant, then cut it lengthwise. Cut it lengthwise again, and then again, so you have long triangle shapes, and then slice those into little triangles. Dice the onions and slice the mushrooms.
Heat a large pan or wok with enough coconut oil or avocado oil to coat the pan on medium heat. The coconut oil will be absorbed by the eggplant and give it a tiny bit of coconut flavor so if you don't want that, use avocado oil. Add the mushrooms, eggplant, onions and garlic to the pan and sauté for 10 minutes or so (stirring frequently) until the eggplant and mushrooms soften and darken in color. Add more oil as needed. The eggplant and mushrooms will cook down quite a bit, so don't worry if it looks like too much initially.
When the veggies are done, sprinkle them with the flour and mix it well. This helps to thicken the sauce once it's added.
Add the sauce to the pan, mix it well for just a minute and then turn off the heat.
Remove the squash from the oven when ready and let sit for about 5 minutes. Then take a fork and start scraping the center out, all the way to the skin. It will start transforming into noodles.
Add the squash noodles to the pan and mix well to coat.
Top with sesame seeds to serve.