We used to find those in my mom's tomato plants all the time.

Nice photos! I hope he cocoons in the plant for you.