I have seen similar looking worms(very,very small,you can hardly see them with naked eye)getting out of one of my purchased seeds.I thought it was rotten from inside,squeeze it and threw it away.I am not sure what was it,kinda look like this one but i guess it is different....:/
Also i have seen similar creatures(but i think they were a little bit bigger,also hard to notice them because they look like thin,moving roots) in some of my soils when they were too wet and my plants were suffering, they just stopped growing☹I took the plants out of the soil and completely washed their roots,than replanted them , I used some kind of pesticide in the soil/on the roots and they survived but.....:(It was scary,i had to throw lots of soil.....Im not sure they were the same like these either. I haven't seen nematodes directly IN the stem,wow!Terrifying!!!!!!They are all nasty!
I would spray them with something appropriate.More than once:)Hope they are not in flower?also you could clean everything and check the soil.Are they in the soil to?Outdoors i use lime and i paint the stems with it(you know like fruit tree)when possible.I guess they wont like it.
How old are your plants?Are they all infected?You could use something like lavender and wipe/spray the plant's stem and leaves.