Why limits exist
Without limits, a stuck model can loop forever — calling the same tool repeatedly, or an orchestrator delegating endlessly. Each loop costs money and time. The engine enforces these caps at the runtime level, not through prompts. A prompt can ask the model to behave; only the runtime can guarantee it stops.Default limits
| Limit | Default | Meaning |
|---|---|---|
max_iterations | 20 | Model→tools→model rounds per node |
max_tool_calls | 10 | Total tool calls per run (local + MCP combined) |
max_tool_calls_per_agent | 4 | Tool calls per agent per run |
max_child_agent_calls | 8 | Times an orchestrator can call child agents |
allow_duplicate_tool_calls | false | Block identical repeated calls |
execution: block in your YAML.
Configuring limits
Add anexecution: block to your spec. Any omitted key keeps its default.
agentctl validate with a clear error.
What happens when a limit is hit
The run degrades gracefully — no exception, no crash.- Tool/child-agent limits and duplicates — the call is blocked. The model receives a short message like “Tool call limit reached, finish with what you have.” and naturally wraps up.
max_iterations— the node’s loop stops and returns the latest model response.