Agents keeps going in a loop

Is the returned text longer than 2048 tokens? If that’s the case, this issue was discussed in this thread.