Rinse and drain beans; trim and discard stem ends. In each of two 12- by 17-inch baking pans, mix half the beans with half the oil; spread level.
Bake in a 450° regular or convection oven until beans are slightly browned and tender when pierced, 15 to 25 minutes; switch pan positions halfway through baking.
Stir half the nuts and butter into beans in each pan; continue baking until nuts are golden, 5 to 6 minutes longer. Pour into a bowl, add 1/4 teaspoon cayenne, and mix well. Taste and add more cayenne and salt if desired.