Preheat your oven to 200°C (400°F). Pat the chicken thighs dry and season generously with salt and pepper on both sides. Drying the skin first is the real secret to getting it crispy instead of soggy once it hits the pan.
Heat olive oil in your oven-safe pan over high heat. Lay the chicken skin-side down and leave it alone for 6-7 minutes without moving it. This builds a deep golden crust that holds up beautifully through baking.
Remove the chicken and set it aside. Lower the heat slightly and cook the onion for about 5 minutes until it softens and turns golden. Stir in the garlic and tomato paste, cooking for another minute until fragrant.
Return the chicken to the pan, skin-side up, nestling it into the onion mixture. Pour in the chicken stock and water, then scrape up any browned bits stuck to the pan. Let it simmer for 5 minutes so the flavors combine.
Break the spaghetti in half and tuck it under and around the chicken pieces, making sure it's fully submerged in the liquid. This lets the pasta cook directly in that flavorful broth instead of separately in a pot.
Put the lid on and transfer the pan to the oven. Bake for 25-30 minutes, until the spaghetti is tender and most of the liquid has been absorbed. Check once around the 20-minute mark to make sure it isn't drying out.
Remove the lid and sprinkle the mozzarella and parmesan generously over the top. Return the pan to the oven, uncovered, for another 5-7 minutes until the cheese is melted and slightly golden.
Switch your oven to the grill or broil setting for 2-3 minutes to get that irresistible bubbly, browned cheese top. Watch it closely so it doesn't burn.
Let the dish rest for 5 minutes before serving. This helps the sauce settle and makes it much easier to plate. Finish with lemon zest and fresh thyme for a pop of color and flavor.