Advice for the Home Gardener from the Help Desk of the
UC Master Gardener Program of Contra Costa County
MGCC Help Desk Response: Thank you for contacting the UC Master Gardener Program Help Desk. You asked about carpenter bees boring a hole in your roof beams and how to get rid of them without killing them. From your description and the description of the holes, it does indeed seem likely they are carpenter bees, but we would recommend getting a positive identification before taking control measures. These very large bees with a loud buzz are quite obvious, the females being large and shiny black. The males are those beautiful golden fuzzy 'teddy bear' bees. You may also see pollen-laden bees entering the hole to feed their babies!
Only the females build nests, boring a tunnel into soft wood, leading to one or several nest cavities. They do not create hives, but several females may use the same tunnel for the nest. They mate and lay eggs in the spring, the young bees developing over several months - there is only one generation each year. These bees can indeed damage wood structures, but unless there are many holes you probably have time to consider control methods. As you do not want to kill them, and there may be young brood inside the nest at this point, you might want to wait until late summer after the bees have emerged. Then you can plug the holes and paint or stain the wood to discourage any further nesting.
Here are some UC links with more information on this bee, and how to manage them.
http://ipm.ucanr.edu/PMG/PESTNOTES/pn7417.html
https://ucanr.edu/blogs/blogcore/postdetail.cfm?postnum=8049
We couldn't find any information on how to remove them without killing them - it also seems that even if the adults are excluded, the young bees can chew their way out of the nest after they hatch. So if you can wait, I think you would be fine waiting until later in the summer to paint and fill the holes, and then hopefully they will cause no further problems. Meanwhile, enjoy these beautiful and useful creatures in your garden.
If you are a DIY person, there are plenty of articles found via Google for fixing the holes as well as techniques to assure that the bees don't come back (they can be homing to their birthplace). And there may be contractors around that specialize in "fixing" the problem.
Good luck with this!
Help Desk of the UC Master Gardener Program ofContraCosta County (SMW)
Note: UC Master Gardeners Program of Contra Costa's Help Desk is available almost year-round to answer your gardening questions. Except for a few holidays (e.g., last 2 weeks December), we're open every week, Monday through Thursday for walk-ins from 9:00 am to Noon at 2380 Bisso Lane, Concord, CA 94520. We can also be reached via telephone: (925) 608-6683, email: ccmg@ucanr.edu, or on the web at http://ccmg.ucanr.edu/Ask_Us/. MGCC Blogs can be found at http://ccmg.ucanr.edu/HortCoCo/ You can also subscribe to the Blog.