This is just what I've worked out from observation, so I've probably missed a lot of details
First, the head moves like a roach, except that a move is treated as blocked if it can't find a valid move for the entire chain. Then, if the head is moving so it's no longer adjacent to the first chain square, that square will move to follow the head, and so on. This usually leads to the gentryii gradually straightening itself and evening out kinks.
If the head doesn't move, sometimes kinks will straighten by themselves, sometimes not. For instance, suppose these two gentryii have their heads blocked by wall to the east, and Beethro is directly east. The first will straighten itself out, the second will not.
____ __G
\/
__ __G
|_/\/
____________________________
50th Skywatcher