Coelomera ruficornis lives on Cecropia pachystachya, a tree with a mutualistic association with the ant Azteca alfari.
The ants live in the hollow branches and shoots, a newly mated queen having entered through the prostoma, an indented groove at a node in the stem.
When fully developed, they descend to the base of the tree, and pupate in earthen chambers.
[2] Another species of ant, Azteca muelleri, also lives on C. pachystachya, and is not so tolerant of the presence of the beetle.
It removes C. ruficornis from trees it has colonised, and the larger the ant colony, the more quickly the beetles are located and expelled.