I've done similar things in large containers and not a problem. 12-24 inches on top you'll be fine. I have not used branches and not sure what benefit they would provide in a container for bush beans, I would expect them to slow down the breakdown of the compost? Things break down really slowly here in my climate... If you're expecting weather to be hot, branches might be a good thing to reduce the heat in the compost itself. But if you expect weather to be cool, beans will benefit more from warmth in the soil, then leave branches out in that case?
The compost will shrink btw, expect your plants to end up some inches lower than when you started.