In a food processor or blender, pulse bread, butter, salt and pepper until mixture resembles coarse crumbs. Transfer to medium bowl and toss with onions; set aside.
Preheat oven to 425 degrees. Prepare a 8 inch square, or 11x7 inch, baking dish.
In a large pot, bring 2 quarts of water to boil. Add beans and 1/2 tsp salt. Cook until beans are bright green and crisp tender, about 5-6 minutes. Drain beans and plunge into ice water to stop cooking. Spread on paper towels to drain.
Add butter to empty pot and melt over medium-high heat. Add mushrooms, garlic, 1/4 tsp salt and 1/4 tsp pepper; cook about 5 minutes until mushrooms release moisture and then evaporates. Add flour and cook one minute more.
Add both and bring to simmer, stirring constantly. Add half and half, reduce heat to simmer and cook until thickened--5-6 minutes.
Add beans to sauce and stir to coat. Pour into prepared baking dish. Sprinkle with topping and bake until golden brown, about 10 minutes.