I found these stalks with seed pods on the power lines in Crownsville, on a hillside facing ESE and would like to know what they are. The yellow berries were in the same area and I think I've seen them near the soggy area at the bottom of the hill as a low plant in the high grass. Thanks, Beth
Did you happen to notice if the stalks with the pods had thorns on them?
We can't tell size from your photo, but one possibility is Robinia pseudoacacia, a.k.a. black locust tree seedlings or suckers from a nearby mature tree.
If it is a weed, it is definitely a legume, like vetch or senna, but we can't tell for sure at this time of year. You could attach photos to this reply if and when you encounter it again with leaves, or even better, in flower.
The yellow fruits are likely either Horsenettle (Solanum carolinense) or Clammy groundcherry (Physalis heterophylla). Can't say for sure at this time of year.