Preheat the oven to 350 F
Place the tomatoes and smashed fresh garlic cloves in a mostly single layer in a 9×13 inch baking dish, 11-inch braiser, or oven-proof skillet.
Add the olive oil ( see notes) and thyme sprigs and season with salt and pepper. Cover tightly with a lid or with foil.
Bake for 60 minutes, giving the pan a little shake halfway through. At 60 minutes, the tomatoes should have collapsed slightly, and the garlic should be caramelized. If you like them a little more caramelized, roast uncovered for 10-15 more minutes. If preserving for later, add ¼ cup more oil to the pan. Remove from oven and let cool for 10 minutes before adding basil leaves.
Taste, adjust salt and pepper.
Serve right away (with a drizzle of balsamic if you like) or store in an airtight container or jar for up to 2 weeks in the refrigerator, covered with the reserved oil. If the tomatoes are exposed to air, they can mold, so be sure to sink them down.
