What quantization are you using? Which infra provider?
Baseten.co's version got into a loop rather rapidly... I've since added loop detection and adjusted some other settings on the pi coding agent and have yet to notice it again. I also switched to DeepInfra ... who serves an fp4 version admittedly, but I've had no issues with it as of yet and it's the top provider on openrouter.ai volume wise.