Preheat the oven to 220°C (Fan oven 200°C, gas mark 6) and line a large roasting tray with baking parchment.
Place the breadcrumbs, pistachios, parsley and lemon zest in a food processor, and blitz to make fine crumbs. Tip into a shallow bowl.
Crack the egg into another shallow bowl and add 1 tbsp of the tomato purée. Whisk until combined. Tip the flour into a third shallow bowl.
For each fillet, season, lightly coat in flour, then dip into the egg mixture and roll in the crumbs. Dip the cod in the egg again and then the breadcrumbs to give the fillet a double coating and place onto the baking tray. Repeat the process with all the fillets and set aside.
Add the oil, onion, carrot and celery to a frying pan and cook over a medium heat.
Meanwhile, roast the fish in the oven for 10 minutes then add the tomatoes to the tray and cook for a further 5 minutes, until the fish is cooked through and the tomatoes are just softening.
Stir in the remaining tomato purée to the onion carrot and celery. Increase the heat then add the lentils and 100ml water and cook for 2 minutes, or until piping hot.
Remove from the heat, then stir in the tapenade. Serve with the cod and tomatoes, garnished with basil leaves.