How to Make It
Rinse beans under cool tap water. Put in a pot, cover with 3 in. cold water, and let soak overnight. Or, bring them just to a boil, then immediately remove from heat and let sit 1 hour, covered.
If soaking liquid is cloudy, drain and replace, covering beans with at least 2 in. water; if clear, add enough to cover by 2 in. Bring to a boil, then immediately reduce heat to a simmer. Skim any foam from surface. Add sliced garlic and bay leaf and simmer, partly covered, until tender, 45 minutes to 2 hours, depending on how long beans have been sitting on the shelf. Stir in salt.
While beans are cooking, put pesto ingredients in a blender or food processor and blend to a coarse purée.
Ladle out 1 cup cooking liquid and set aside. Using a slotted spoon, transfer warm beans to a serving bowl and stir in 1 1/2 cups pesto, along with some reserved cooking liquid to loosen them up. Serve hot, with remaining pesto on the side.
Make ahead: Beans and pesto separately, up to 2 days, chilled (store beans in cooking liquid, and press plastic wrap against surface of pesto).