Heat the olive oil in a large pot over medium-low heat. Add the onion, carrot, celery and fennel seeds with a big pinch of salt.
Cook gently for 10 minutes until soft.
Add the garlic, red pepper flakes (if using), rosemary and thyme. Stir for 1 minute, until fragrant.
Add the butter and stir until melted. Sprinkle over the flour and cook, stirring, for 1 minute. Gradually pour in the chicken stock, stirring well as you go.
Bring the stock to a gentle simmer, then add the whole chicken thighs. Cook for about 12–15 minutes, depending on their size, until cooked through. Keep the soup at a gentle simmer.
Transfer the chicken to a board and shred it with two forks. Return it to the pot along with the gnocchi. Simmer gently for 2-3 minutes.
Stir through the half and half and stir in the spinach and cook for a further 2 minutes until it is wilted. Stir in the black pepper and taste for salt, how much you need will depend on your stock.
Turn off the heat, add the lemon zest and lemon juice. If you’d like a brothier soup, add a splash of hot chicken stock before serving.