Toast the Garlic: Place the unpeeled garlic cloves in a small skillet over medium heat. Toast them, shaking the pan occasionally, until the color of the cloves deepens slightly (approx. 7 minutes).
Transfer them to a plate to cool slightly, then peel and mince.
Prepare the Pesto Base: Place the basil leaves in a heavy-duty zipper storage bag. Pound with a meat mallet or rolling pin until the leaves are lightly bruised.
Blend: In a food processor, combine the minced toasted garlic, bruised basil, 0.125 cup coconut milk, minced shallot, 2 tbsp olive oil, and 0.5 tsp sea salt. Process until smooth (approx. 30 seconds), scraping down the bowl as needed.
Combine and Serve: Stir the prepared spaghetti squash with the pesto mixture.
Season with additional sea salt and pepper to taste before serving.