Put the tagliatelle or linguine into a large saucepan and cover with plenty of boiling water. Add a pinch of salt and cook for 8-10 minutes, according to pack instructions.
Meanwhile, heat the oil in a frying pan and cook the chicken over a medium-high heat for 5-6 minutes, stirring often. Add the onion, garlic and chilli and cook for a further 2-3 minutes.
Add the tomatoes and mushrooms to the chicken, cook for 3-4 minutes, then stir in the pesto, olives and capers. Add a splash of hot water (about 2 tbsp) and keep warm over a low heat.
Drain the tagliatelle or linguine in a colander and return it to the saucepan. Stir in the chicken pesto mixture and heat for about 1 minute, stirring gently. Serve, sprinkled with parsley and black pepper.