Unverified50% confidenceSolutionExact time
The agent loop implementation places the generate_content call inside a loop of at most 20 iterations, passing the complete messages list each time, with the exit condition being that the response returns a text attribute.
1
Sources
50%
Confidence
Medium-term (~90 days)
Relevance
10/3/2026
First Seen
Valid until: 1/1/2027
Sources
Related Entities
Related Claims
Unverified在Agent Loop中如果只将工具结果塞回messages而漏掉assistant消息,模型会陷入无限循环,不断重复调用工具73% similarUnverifiedThe termination condition of an agentic loop typically falls into one of two categories: the model returns a plain-text response (stop_reason is end_turn), or the preset maximum number of iterations is reached.68% similarUnverified使用老版Agent时应设置max_iterations防死循环、设超时、加early_stopping_method=generate、给工具加输入校验、接入LangSmith做全链路Trace64% similarUnverifiedSub-agents that stop upon reaching the maxTurns limit will now return output marked as partially completed with a prompt that continuation is available via SendMessage64% similar
Cite This Claim
Stable URI
https://kongchang.com/claim/970245API
curl https://kongchang.com/api/v1/knowledge/claims/970245MCP
get_claim(id=970245)