The game says that the black worms don't attack you unless you get between them and food. I don't see how they "don't attack me" when they actively lunge at me and kill me in one go.
They don't chase you, but they have own route and wants to eat any dead segments. Press key '5' in the game and you could see their target (red line from it head). Red circle is area of worm's AI vision, green line is route of other black worm (route is not hard, just way to go when there are nothing to eat and chase).