Prep the green beans by cutting one-third of them into 2-inch pieces. Leave the remaining two-thirds whole. 2.
Bring a large pot of water to a boil.
Add 1 tablespoon (15 ml / 0.5 fl oz) of salt and the spaghetti.
Cook according to package directions, adding the 2-inch green bean pieces during the last 5 minutes of cooking time. 3.
Before draining, carefully ladle out and reserve 1 1/2 cups (480 ml) of the starchy pasta water.
Drain the pasta and beans, then return them to the hot pot.
Cover to keep warm. 4.
While the pasta cooks, make the pesto.
Heat 1 tablespoon (15 ml / 0.5 fl oz) of olive oil in a medium skillet over medium heat.
Add the chopped onion and minced garlic, cooking until the onion is soft and translucent. 5.
Add the whole green beans to the skillet.
Cover and cook for 5 to 7 minutes, stirring occasionally, until the beans are tender-crisp. 6.
Transfer the cooked green bean and onion mixture to a food processor.
Add the spinach, basil, toasted almonds, Parmesan cheese, and lemon-pepper seasoning. Pulse with on/off turns until everything is coarsely chopped. 7. With the food processor running on low, slowly stream in the 1/2 cup (480 ml) of olive oil until the pesto is nearly smooth.
Season to taste with salt and pepper. 8.
Add the green bean pesto to the pot with the warm pasta and beans.
Stir to combine, adding the reserved pasta water a little at a time until the sauce reaches your desired consistency. 9.
Serve immediately, sprinkled with chopped hard-cooked eggs, sliced green onions, and a fresh squeeze of lemon juice.
Enjoy with toasted baguette slices on the side, if desired.
Don't skip reserving the starchy pasta water! It's the key to creating a silky, emulsified sauce that clings perfectly to the spaghetti.