In a 10- to 12-inch frying pan over medium-high heat, melt butter. Add onion and stir often until tinged with brown, 3 to 5 minutes. Add mushrooms. Stir often until mushrooms are lightly browned, 5 to 8 minutes.
Meanwhile, in a 4- to 5-quart covered pan, bring 3 quarts water to a boil over high heat. Add beans and cook, uncovered, until tender-crisp when pierced, 6 to 12 minutes, depending on variety. Drain beans and put in a shallow serving dish.
Blend cornstarch with 1/3 cup water, dry sherry, and 2 teaspoons soy. Add to mushroom mixture and stir over high heat until boiling. Add sesame oil.