Preheat oven to 425°F. Place the tomatoes, onion, and garlic on a baking sheet. Generously coat with olive oil and season with salt and pepper. Place in the oven and cook for 30 minutes, tossing them a little at about 15 minutes.
While the sauce is cooking, bring a pot of water to a boil for the pasta. Remove the tomato mixture from the oven. Smash the soft garlic cloves into the sauce. Taste. Season with salt and pepper and set aside.
Once the pasta water is boiling, season it generously with salt. Add pasta and cook until al dente. Once the pasta is al dente, scoop it out of the pasta water and place it directly on the baking sheet. Toss it with the tomato sauce, adding a little pasta water to thin it out if necessary. Divide pasta into individual bowls and top with fresh basil leaves.