I read that raw beans have a substance that makes them somewhat toxic to chickens, but I'm not sure how toxic. Tomato leaves and stems are also toxic and I've seen mine nibble on a plant through the fence with no ill effects, so maybe they need to eat a certain amt to see issues.
Maybe he's been...
Do a search on sour crop and MissPrissy. She outlined a procedure to follow with this. My blue Orp hen just died of this and I have another one that has it, but is recovering.