Heat the oil in a large frying pan and cook the onion gently for about 8 minutes until soft.
Add the garlic and cook for a further minute.
Tip in the mushrooms and carrot and cook for 6 to 8 minutes, stirring occasionally, until the mushrooms have released their liquid and it's mostly cooked away.
Take the pan off the heat and stir in the lentils, breaking a few up with the back of a spoon.
Add the Cheddar, breadcrumbs, mustard and sage, season well with salt and pepper, and mix thoroughly. Taste and adjust the seasoning.
Cover and chill the mixture for 20 minutes.
Preheat the oven to 200C, 180C fan, gas mark 6, and line two baking trays with baking paper.
Unroll one sheet of pastry and cut it in half lengthways into two long strips.
Spoon half the filling in a line down the centre of each strip.
Brush one long edge with beaten egg, fold the pastry over the filling, and press the edges together to seal.
Crimp the seam with a fork, then turn the roll seam side down. Repeat with the second sheet of pastry and remaining filling.
Cut each long roll into 4 pieces and place seam side down on the baking trays.
Brush the tops with beaten egg, scatter over seeds if using, and snip a couple of small slits in each top.
Bake for 25 to 30 minutes until deep golden brown and crisp all the way through.
Leave on the tray for 5 minutes before moving, to let the filling firm up.