In a large pot, heat oil over medium heat. Saute onions 3-5 minutes or until they start to soften and turn translucent. Stir in garlic and cook another minute.
Pour in tomatoes, chicken stock, pesto, sugar, bay leaf, thyme, salt and pepper. Cover and simmer 30 minutes.
Remove bay leaf and puree using an immersion blender. {A regular blender works just fine as well.}