How to Resolve the “Maximum iterations of ‘25’ reached” Agent Runtime Error

If you encounter the following error while running an agent:

Maximum iterations of ‘25’ reached
Code: AGENT_RUNTIME.TERMINATION_MAX_ITERATIONS

This typically means the agent reached the maximum number of allowed steps before completing its task. To resolve this, you can increase the Max Iterations setting.

Steps to fix:

  1. Open the Agent Definition.

  2. Go to the Properties panel on the right.

  3. Locate the Max Iterations setting.

  4. Increase the value from 25 to 100.

  5. Save the changes and rerun the agent.

Increasing the max iterations gives the agent more room to complete multi-step tasks before timing out.

Cheers,
PD