Preheat oven to 200C/390F.
Slice your tomatoes in half and evenly place them flesh side up on a suitably sized tray. Generously season with salt and pepper, then flip over. Chuck on your garlic and thyme, drizzle with olive oil and pop in the oven for 25-30mins or until wilted and lightly charred.
Meanwhile, melt the butter in a suitably sized pot over medium heat and add the onion. Fry until it just begins to catch colour, then turn heat to low and gently continue frying until caramelized.
Add tomato puree and fry for a minute or so, then deglaze with balsamic vinegar.
Pop the garlic out of the skins and remove the thyme from the tray. Pour everything (including the juices) into the pot with the onions. Add stock and basil, then leave to simmer with the lid on for a good 30mins.
Blitz using a hand blender and test for seasoning. If you prefer a thinner texture then gradually add more stock. To thicken just simmer with the lid off.
