Cook pasta in a large pot of boiling water until al dente, about 8 minutes. Reserve at least 1 cup of pasta water before draining.
Meanwhile, in a large skillet over medium heat, heat oil and add mushrooms. Cook until nicely browned, about 10 minutes, stirring occasionally; season with salt and pepper and turn heat down to low. Stir in mascarpone, pesto, basil, and about ½ cup of reserved pasta water until smooth.
Combine the pasta and sauce together over low heat and stir, adding enough pasta water to get the consistency you like. Taste and season with salt and pepper if necessary. Serve with parmesan cheese, if desired.
