Sweat the onion in a splash of olive oil over a medium heat until soft and translucent.
Add the red pepper, courgette and garlic and fry for a couple of minutes more.
Add the taco seasoning, then stir in the tomato purée and heat through for about a minute.
Add the cooked green lentils, kidney beans, sweetcorn and stock and stir to combine, then fold in half of the cheddar and let it melt into the filling.
Pour the filling into a pie dish and scatter the remaining cheese over the top.You can also leave it in the pan, if the pan is ovenproof.
Cut the puff pastry into smaller pieces, – squares, triangles or whatever you prefer, and arrange them over the top of the filling.
Brush with the beaten egg, sprinkle with sesame seeds and bake the pie in a preheated conventional oven (top and bottom heat) at 200°C for approx. 20-25 minutes.
Let the pie rest for just under 10 minutes before serving, and serve with ice-cold crème fraîche, a fresh, crisp salad and tortilla chips.