Boil pasta according to package instructions or al dente. Drain water, reserving about a cup. Set aside.
Salt chicken breast, then season with Italian seasoning. Alterrnatively, use just salt and pepper.
Heat oil in a large saucepan or skillet over medium heat until hot, and then add the chicken, brown for 4-5 minutes on each side to ensure even brownness. Gently remove the chicken and set it aside.
Add butter to the same skillet over medium heat until melted, then add onions, garlic, and thyme. Saute for 2-3 minutes, or just until the onions wilt.
Whisk in flour, turn the heat to medium-low, and cook for about a minute .
Pour in heavy cream and add chicken, broth, and cream while whisking. Bring to a boil, then reduce heat and simmer for 3-5 minutes (or until the sauce has reduced and thickened).
Add pesto, parmesan cheese, and pepper flakes (optional).
Follow with the cooked pasta and stir to coat. If the sauce is too thick, add the reserved pasta water. Remove from the heat.
Serve topped with chicken breast and garnish with fresh chopped basil.