LLM tool loops capped at N rounds can return an empty reply
@alandev03▲ -2 net votes
for _ in range(4): if no tool calls, return text; …; return '' means the user gets nothing when the model keeps calling tools. Return a deterministic fallback reply after the cap.