The agent hit its limit and still said it was done
An agent that stops at its step or tool-call limit can still return a normal-looking answer. Six checks for AI agent run limits before go-live.

The test report showed zero failed runs. One of those runs had stopped at its limit with no answer.
Agent platforms put limits on a run: steps, time, tool calls, failures in a row. A limit stops a run that would go on too long or cost too much. The harder part comes after the stop: what the agent hands back, and what the run status says about it.
Three reports from this year show the gap.
Three reports about run limits
No failed runs, and one empty answer. A team that runs its own workflow server reported on the tool's issue tracker in September 2026 that they had tested an agent with four tools on a set of 25 questions, in two passes. Fifty answers came back, and no run failed. But one question had looped: the agent called the model 25 times with the same prompt, no tool ran, and no text came back. When that question ran again, the run stopped at its limit of 25 iterations with no answer, and it was not marked failed. The reporter found the cause in the source code: a tool step had been renamed when it was copied, so the model asked for a tool that no longer existed, and the agent dropped the request without a line in the log. A second user reported the same result. At the end of September, no maintainer had confirmed it.
Nothing in the log. Another reporter described a similar pattern on the same tracker in August 2026, also on a self-hosted server. Their agent had one search tool and a limit of 12 iterations. After one to three tool calls, the model kept asking for a tool. The agent ran no tool, added nothing to the conversation and sent the same prompt again, until it reached the limit. With a different family of models, most of the model's replies were dropped instead, and the run did finish in the end, after about five times the usual number of model calls. The reporter wrote that nothing was logged at any level: no error and no warning. When the page was read, no maintainer had answered.
A limit that never acted. A developer described on a forum in June 2026 an agent with a tool that reads PDF files. Asked one question, the agent read the same 200-page document more than 60 times. It had an iteration limit of 15. According to the developer, every tool call started the count again at one, so the limit never acted. They watched the bill climb to several hundred dollars in about ten minutes, then stopped the script by hand.
What the three have in common
In each report, a limit was set. In the first two, it acted, and the run still did not look like a problem: a run that was not marked failed, and a log with nothing in it. In the third, the limit counted something other than what the builder expected, so it never acted at all.
A limit protects your budget. It does not tell you that the work was done. For more on runs that report success without doing the job, see A green tick is not a finished job.
Six checks for agent run limits
These checks apply to any platform that runs agents, ours included. Where EpicStaff answers a check, the answer is under it.
1. List the limits each agent has, and what each one counts
Useful limits are steps, run time, tool calls, time per tool call and failures in a row. For each one, find out what it counts. A step can mean one model call, one tool call, or one round of both. A limit that starts again from zero during the run, as in the third report, does not stop anything. For limits that stop a run while it is still going, see Who stops the loop? Limits that act during the run.
In EpicStaff: Set a step limit, a time limit for each agent task, a tool-call budget, a per-tool timeout and a failure limit for each agent. The run record stores which limit stopped it. The five fields are on the Execution tab of the agent's additional settings.
2. Know the default when nobody sets a limit
Many agents go live with limits that nobody chose. Find out what each limit is when its field is empty, and whether that default is the same for every agent on the installation. Then decide, agent by agent, whether the default fits the work.
In EpicStaff: When a field is empty, an install-wide default fills it before each run: 25 steps, 15 tool calls, 300 seconds per tool call, and 3 failures in a row. Each agent has a time budget for each task, 10 minutes by default. You can set 1 to 30 minutes on its Execution tab. When it runs out, the step fails and the run ends with the status "error".
3. Know what the agent hands back at a limit
A platform can end a run at a limit with an error, with nothing, or with the best answer the agent can give at that point. A best answer is often useful, because part of the work may be done. It also reads like a complete answer. Find out what your platform does at each limit, and make sure the next step in your process can tell the difference.
In EpicStaff: When the agent hits its tool-call budget or its failure limit, it is asked for its best answer, and that answer becomes the output.
4. Check whether a capped run looks like a finished one
Put the status of a run that stopped at a limit next to the status of a run that finished its task. If they are the same, read the stop reason as well (check 5).
In EpicStaff: A run whose agent hits the step limit, the tool-call budget or the failure limit can still finish as a normal run. An agent time-out or a model error fails the run with an error status. A run that passes its overall time limit gets the status expired.
5. Find where the stop reason is written down
The stop reason is what tells a capped run from a finished one. Find out where your platform stores it, with the number of steps and tool calls the run used, and make it part of what you review. For what else a run record should hold, see The agent finished. Nobody can say what it did.
In EpicStaff: The stop reason, the step count and the tool-call count are stored in the agent's finish record and in the session export (JSON). Read the stop reason there, not only the run status.
6. Hit each limit once, on purpose, before go-live
Copy the agent and make the copy run into each limit in turn: a task that needs too many steps, a tool that always fails, a slow tool, a task that runs too long. For each test, note what the agent handed back, what the status said, and where the stop reason appeared. For how to test the rest of a workflow, see You cannot test an AI agent like normal code. You can test most of the workflow.
Count the runs that ended on a limit
Most teams report on their agents with two numbers: runs that succeeded and runs that failed. Add a third: runs that ended on a limit. Take it from the stop reason, per agent, every week.
A few runs on a limit are normal; a limit is there to catch the odd case. A rising number tells you that the work has grown, that a tool has changed, or that the agent has started to loop. In the first report, this third number would have shown the one run that the failure count did not.
Q&A
What does "max iterations reached" mean for an AI agent?
It means that the agent used all the steps it was allowed before it finished its task. One iteration is usually one model call, often with a tool call. The limit stops a run that would loop or go on too long. Read what the agent handed back, and find out why it needed so many steps: a loop, a failing tool, or a task larger than the limit.
Should an AI agent run that hits its limit count as failed?
Both choices are reasonable. A failed status makes the stop visible. A successful status with a best answer keeps the part of the work that was done. Whichever your platform does, record the stop reason with each run, and let the next step check it before it uses the output.
How do I choose a step limit for an AI agent?
Measure first. Run the agent on a set of normal tasks and note how many steps each one needed. Set the limit somewhat above the largest normal run, so that normal work never meets it and a loop does. Look again when you change the model, the tools or the instructions, because each of them can change how many steps a task needs.
What happens when an EpicStaff agent reaches one of its run limits?
When the agent hits its tool-call budget or its failure limit, it is asked for its best answer, and that answer becomes the output. A run whose agent hits the step limit, the tool-call budget or the failure limit can still finish as a normal run. The run record stores which limit stopped it. Read the stop reason in the agent's finish record or in the session export (JSON).


