Ultimate

X_AGENT_TOOL_LOOP

Means

an agent repeated one tool call with one result and was stopped

Typical cause

an agent() asked for the same tool calls with the same arguments and read the same results on consecutive turns — or went round a cycle of 2 or 3 such turns — so no later turn can differ. Stopped at maxRepeatedToolCalls (default 3) laps instead of spending every remaining turn re-sending a growing transcript for the same non-answer. Terminal: a job does not retry it

Fix

maxRepeatedToolCalls: 5 — on the agent, only for a tool that is polled and answers identically while it waits; otherwise tell the template what to do when a tool result does not change, then bump its version

Listed under MCP and AI

This page as markdown