For the beans: Rinse the beans with cold water, then place in a pot and cover with more cold water by 2 inches. Add the garlic and a good drizzle of oil. Bring to a boil and let cook for 10 minutes. Remove the pot from the heat and cover tightly. Let sit at least 2 hours, or up to all day.
When ready to complete the dish, return the beans to a simmer and cook until soft, 10 to 20 minutes. Test their doneness after 8 to 10 minutes, as the more time they soak, the less time needed to finish cooking.
For the pasta: Bring a large pot of water to a boil and salt generously. Add the pasta and cook only until al dente.
While the pasta cooks, place the oil, garlic and hot pepper if using in a skillet and place over low heat.
Drain the pasta and return to the pot. Pour the pot of hot beans over the pasta, water and all, and bring to a simmer.
Meanwhile, raise the heat under the skillet to high and cook until the garlic is golden brown, watching closely. Carefully pour the oil, garlic and peppers into the pot and stir together well. Serve immediately.