Diluting the pesto is the most reliable way to soften the garlic. There’s no all-purpose ingredient that will cancel its sharpness without changing the sauce.

Since you’re out of basil, add more nuts and Parmesan a little at a time. They’ll increase the amount of pesto and balance the garlic with richer flavors. Parsley or baby spinach can also help dilute it and keep the sauce green, though either will change the flavor. Add a little more olive oil with these ingredients, but go easy: too much oil on its own will make the pesto greasy.

You can also use less pesto per serving and stretch it with pasta water, or mix it with ricotta for a milder, creamy sauce.

A small squeeze of lemon may help balance the flavor, but it won’t reliably take away the garlic bite. Try a few drops in a spoonful before adding any to the whole batch.

Next time, start with less raw garlic and taste before adding more. Blanching or roasting the garlic first will give it a gentler flavor, too.