The garlic can be roasted ahead or any time your oven is on for something else. Keep the garlic, wrapped in foil, in the refrigerator until ready to use. Slideshow: More Pasta Recipes
Preheat to oven to 400°F. Cut the top 1/4-inch from the garlic head and drizzle with a little olive oil. Sprinkle with a pinch of salt, then wrap the garlic head in foil and roast in the oven until golden and caramelized, about 40 minutes. Let the garlic cool to warm, then peel the cloves.
In a food processor with the motor running, drop in 3 of the roasted garlic cloves and finely chop. Add the nuts, cheese, 1 teaspoon salt and 1/2 teaspoon pepper and pulse to finely chop. Add the basil and pulse to finely chop. With the motor running, add the remaining 2/3 cup oil, blending to combine.
In a large pot of boiling salted water, cook the pasta until al dente. Reserve 3/4 cup of the pasta cooking water, then drain the pasta. Toss the pasta with the pesto and about half the reserved cooking water. Add more water for a looser consistency.
Halve the tomatoes and toss with the pasta along with the remaining roasted garlic. Season to taste with salt and pepper and serve.