Cut the carrots, unpeeled potatoes and sweet potatoes in bite sized pieces.
Trim the green beans and cut them in half.
Rinse the Puy lentils in cold water and place them into a big pan. Add carrots, bay leaves, thyme, salt, black pepper, tamari,1 litre of water and crank the heat up. Cover with a lid.
When boiling, reduce the heat and let simmer for 25 min.until almost all the water has evaporated. Keep the lid ajar.
Bring the potatoes and sweet potatoes to boil in a large pot, then reduce heat and let simmer for 15 min.
Drain, put them back into the pot and mash potatoes while adding a bit of milk at a time.
Season with salt and pepper.
Preheat the oven to 400 °F/200 °C
Peel the garlic and add it with the other ingredients for the pesto in a blender. Blend until smooth.
Once the lentils are cooked, stir in the pesto and add the green beans.
Pour the lentil mix into a big oven dish and cover with the mash. If you like it crispy try to form little spikes using a fork.