Chop the walnuts and hazelnuts together. Put a drizzle of oil in the pan and toast all the nuts for about 10 minutes. Then remove them from the pan and save for later. Finely chop the garlic and chilli. Chop up the cherry tomatoes and let them drain. Heat a frying pan with a little oil and fry the garlic and chilli. Add the cherry tomatoes and cod until they are flaky. Finally, add the toasted nuts. Cook the spaghetti in plenty of salted water and drain when al dente. Stir in the sauce, adding if necessary one or two tablespoons of cooking water.
Add a leaf of fresh parsley and enjoy!