Preheat the oven to 200°C.
Halve the tomatoes and put them cut side up in a roasting dish.
Chop the garlic and sprinkle on top of the tomatoes. Drizzle with the oil, then scatter with sugar and seasoning.
Bake for 20 minutes until the tomatoes are soft but not mushy.
Meanwhile, cook the spaghetti in boiling water - for the last five minutes add the peas and beans (each cut into 3 pieces).
Drain the pasta and the veggies and transfer to a serving dish. Add the roasted tomatoes, together with its juices. Season with salt and pepper, crumble the feta and scatter the basil on top. Toss before serving.