The length of software and reasoning tasks AI agents can finish, measured at a 50% success rate, doubled about every seven months from 2019, METR reported in March 2025. If you run them in your business, what stops one of yours when it gets stuck in a loop?
Without enforced limits, often nothing until the invoice arrives. A longer task means more steps, and most steps are calls to a model, usually billed by the text it reads and writes. An agent caught in a loop does not crash. It keeps working, and it keeps spending.

Why longer tasks raise your bill
METR measures software and reasoning tasks by how long they take human professionals, and estimates the length at which an agent succeeds alone half the time, for models released since 2019. As that length grows, you can give your agents longer jobs with more steps. Each step typically resends the run's history, so the input grows and step cost tends to rise.
More steps also mean more to control. In a survey published in January 2026, 65% of 130 US leaders at companies with $1B or more in revenue named the complexity of agent systems as their top barrier to rolling out AI agents. It ranked first in the previous quarter as well.
What a loop looks like inside
An agent runs in a cycle. The model picks the next action, a tool carries it out, the result goes back to the model, and the model picks again, until it decides the task is done.
A loop is when it never decides that. A tool returns an error, the model changes its request slightly, and it tries again. Each attempt looks reasonable on its own. Without an enforced stopping condition, the cycle can repeat and keep adding to the bill.
Three controls outside the model
The software around the model enforces all three, because an agent stuck in a loop cannot be relied on to stop. Each control works whatever the agent decides or does.
- A step limit. A maximum number of steps per task, set from what a normal task takes. When a run reaches it, the task goes to a person with the work done so far.
- A budget cap. A ceiling on what one task may spend, and on what the agent spends in a day. Before each call, the software checks that the call's worst-case cost still fits. If it would exceed the task's ceiling, a person takes over; over the daily cap, the agent pauses.
- A kill switch. One action that stops every running copy of your agent at once and withdraws its access to your systems and data. Test it once before launch.
NIST's 2024 guidance on generative AI says organizations should be able to override or switch off a system acting outside its intended use, and assign who does it. Name two people for the kill switch: the agent's owner and one person outside the team that built it.
A first press of the switch shows two things: that it stops every copy, including runs already in progress, and that it withdraws the agent's access rather than only stopping the process. Until it has been tested, you do not know whether it works on the night you need it.
A runaway run, read from its trace
Your finance team runs an agent that reconciles supplier statements against your ledger. A normal statement takes about 15 steps, the longest about 35. One night a supplier changes its file format. The agent asks for a column the new file no longer has, rewrites its query, and tries again. Each new query fails for the same reason: the column is gone.
With no limit, it runs all night. With a step limit of 40, the run ends there, and the statement goes to a clerk. That supplier sent 60 statements. Partway through the batch, the next call would pass your daily cap, so the software pauses the agent and alerts its owner.
In the morning, the owner opens the trace. A trace records one run: for each step, the tool called, what came back, and the tokens used, the billed units of text. Five of its 40 lines:
| Step | Tool called | What came back | Tokens |
|---|---|---|---|
| 1 | Read statement | 212 lines | 3,100 |
| 2 | Load ledger entries | 198 entries | 4,800 |
| 9 | Query column "Ref" | No such column | 9,400 |
| 10 | Query column "Ref ID" | No such column | 9,900 |
| 40 | Query column "Ref No" | No such column | 21,700 |
Read in order, the lines show three things.
- The normal start. The first steps match any other run: the agent reads the statement and loads the supplier's ledger entries, as rows 1 and 2 of the trace show.
- The repeat. From step 9, every request returns "No such column": the agent tries "Ref", then "Ref ID", and is still trying new names when the step limit stops it at step 40.
- The cost of each step. Tokens per step grow from 9,400 to 21,700, because each call carries the failed history with it, and none of those calls makes progress.
The fix follows from the trace: map the supplier's new format rather than change the model or raise the limit. Without a trace, you know what the run cost but not why.
What the limits cost you
Each limit carries a cost of its own. A step limit set too low sends normal work to a clerk, so set it from the steps a correct run takes. A daily cap pauses the whole agent, so the alert must reach an owner who can act on it the same day. Weigh the clerk time and the delayed reconciliations against the spending the limits prevent on a night like the one above.
Three questions for your AI supplier
If you buy more agents than you build, ask:
- What is the step limit for each task, and who set it?
- What stops a run at its spending cap: a person or software?
- Can you show me the trace of one real run, step by step?
First steps this week
- Take the agent whose bill grew fastest last month. Get its ten costliest traces.
- Compare them to a normal run. Set its step limit above the longest correct run.
- Set a daily cap. Name two people who may stop the agent, and test the switch.
References
- Kwa, T., West, B., Becker, J., et al. Measuring AI Ability to Complete Long Software Tasks. METR, 2025-03-19.
- KPMG. AI at Scale: How 2025 Set the Stage for Agent-Driven Enterprise Reinvention in 2026 (Q4 2025 AI Pulse Survey). 2026-01-15.
- National Institute of Standards and Technology. Artificial Intelligence Risk Management Framework: Generative Artificial Intelligence Profile (NIST AI 600-1). 2024-07.


