Put cannellini beans in a medium pot, cover with water, and bring to a boil. Cover and turn off heat. Let sit 1 hour.
Drain beans, then return to pot and add carrot, celery, halved onion, whole garlic cloves, parsley sprigs, thyme, and peppercorns. Cover with water by 1 in. and bring to a boil. Reduce heat to maintain a steady simmer and cook until beans are tender, 1 to 1 1/2 hours. Discard vegetables and herbs and let beans cool. Drain, reserving liquid, and set liquid and beans aside.
Put 1 tbsp. olive oil, mushrooms, and 1 tsp. salt in a large (not nonstick) frying pan over high heat. Cook, stirring, until mushrooms stop giving off liquid and start to brown. Transfer to a large bowl.
In same frying pan over medium-high heat, add remaining 2 tbsp. olive oil and chopped onion. Cook until onion is soft, 3 minutes. Add chopped garlic and cook, stirring, until fragrant, about 1 minute. Add vinegar and cook, scraping up any brown bits, until pan is almost dry. Return mushrooms to pan along with reserved beans and 1/4 cup reserved bean-cooking liquid. Cook, stirring, until well combined and hot. Stir in chopped parsley and salt and pepper to taste. Serve hot or warm.
Note: Nutritional analysis is per serving.