Preheat the oven to 275 degrees F.
Place the halved tomatoes, onions, and garlic cloves on a baking sheet. Drizzle with half the olive oil and sprinkle with thyme, salt and pepper. Toss to coat well. Place the tomatoes cut-side down, and cook for 2 hours turning the tomatoes after 1 hour. After the second hour, remove the baking sheet, and set aside the unpeeled garlic. Place the rest of the vegetables and the pan juices in a food processor or blender. Add a tablespoon or two of water to the pan to scrape up any bits of flavor stuck onto the baking sheet and add to the food processor. Squeeze out the soft flesh of the roasted garlic into the food processor and add the remaining olive oil. Pulse the mixture until chunky, or puree until smooth, depending on desired consistency. Taste the sauce and season with salt, and pepper, if necessary.
The tomatoes do not have to be "good" tomatoes.