Barbara J. Bromley, Mercer County Horticulturist 2004

Carpenter bee
Carpenter bees ( Xylocopa spp.)

These robust beneficial bees are in the insect order Hymenoptera, family Anthophoridae. They are the size of bumblebees, but have a shiny black abdomen and create breeding galleries in softwoods, especially soffets and deck railings. The female chews a 3/8″ entry hole that looks drilled. The solitary males that patrol the nest opening do not have a stinger.

Carpenter bee hole

IPM control strategies: carpenter bees

Biological Woodpeckers are known to peck into galleries to remove the larvae, but this simply increases the damage to the wood.
Cultural Well-painted wood surfaces are a deterrent. Replace badly damaged softwood (cedar, redwood, pine, fir) with hardwood, such as oak or maple.
Mechanical/Physical Break down nest construction by inserting a straightened coat hanger in the tunnel.
Swat them with a tennis racket or baseball bat as they buzz around
Fill holes deeply with steel wool, then caulking compound or wood putty. (Do not putty holes unless it is known that the bees are out or dead. They will simply chew new exit holes from the inside.)
Chemical Dust diatomaceous earth generously into galleries.
Wasp and Hornet Spray or other labeled insecticides.