Add the walnuts to a large bowl. Pulse them a few times with the immersion blender, just to break them up into smaller pieces. The size should resemble beef crumbles.
Add the oil into a skillet over medium heat. Once hot, add in the garlic and onions.
Stir for about 5 minutes, until the onions are translucent. Add in all the remaining ingredients, except the walnuts and bay leaves.
Use an immersion blender to blend together the mixture in the skillet, to make it smoother. You can leave behind some chunks if you prefer a chunkier sauce.
Once it's blended to the desired consistency, stir in the walnuts and bay leaves.
Turn the heat to medium-low and let it simmer, 90% covered, for about 15-20 minutes, until the mixture has thickened.
Discard the bay leaves, then stir in the cooked pasta.
Remove from the heat. Top with optional fresh basil for garnish, to serve. Enjoy!