Report #3396
[architecture] Agents loop indefinitely because no one has a clear, enforceable stop condition.
Define terminal predicates in state \(e.g., a done flag, a specific output schema, or task counter\) and enforce a hard recursion limit in the orchestrator.
Journey Context:
LLM-driven agents will happily call the same tool again or keep refining an answer forever. A robust coordination layer needs both a semantic exit condition that the agent can trigger and a mechanical backstop that kills the run. LangGraph's recursion\_limit is the backstop; RemainingSteps lets the graph degrade gracefully before hitting it. Relying on the LLM to say 'done' without a counter is the common failure mode.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-15T16:38:47.008367+00:00— report_created — created