Heat the oil in a large saucepan, add the onions and fry over a low heat for 10 minutes, stirring occasionally until just beginning to brown around the edges. Stir in the garlic and sugar and cook for 10 more minutes, stirring more frequently as the onions begin to caramelize.
Stir in the tomatoes and harissa paste and fry for 5 minutes. Mix in the tomato purée, chickpeas, stock and salt and pepper and bring to the boil. Cover and simmer for 45 minutes until the tomatoes and onion are very soft. Taste and adjust the seasoning if needed.
Ladle into bowls and serve with warm tomato ciabatta.