How to Prevent Automation Loops: Triggers and Limits
An automation loop is a workflow that is triggered again by the change it made itself, and so runs without stopping. If every turn contains a model call, a loop can spend a month’s budget in a night. A loop does not raise an error; it simply keeps running. 🔁
This article explains the three kinds of loop, five preventive settings and how to catch a loop early once it has started. The loop meant here is not the agent’s own inner loop; it is workflows triggering one another.
What is an automation loop?
The output of a workflow becomes the input of the same workflow, or of another, and the chain closes.

What kinds of loop are there?
BU BÖLÜMÜN ÖZETİ
- A workflow that triggers itself
- Two workflows that trigger each other
- A retry storm
Three kinds are common. All three are prevented by the same settings.
A workflow that triggers itself
The workflow changes the thing it watches: it updates the record it was told to watch for updates, re-labels the email it was told to watch for labels, adds a row when a row is added. It is the commonest kind and the easiest to prevent, because the circle sits inside a single workflow. A workflow should recognise its own footprint. 🪞
Two workflows that trigger each other
The first workflow writes a record; the second sees that record and writes another; the first sees that one. Each workflow is correct on its own and may have been built by a different person. The circle lies between the two and shows on neither settings screen. The hardest loop to find is the one with two owners. It usually appears months after both were built, when a small change to one brings them into contact.
A retry storm
A step returns an error and the workflow tries again. If the error is permanent, a wrong key or a service that is switched off, the attempt never succeeds and it goes on. If the model call is made afresh on each attempt, a failed job costs many times what a successful one does. Unlimited retrying turns an error into a bill. ⛈️
Which settings prevent a loop?
BU BÖLÜMÜN ÖZETİ
- Narrow the trigger and leave a mark
- Once per record
- A rate limit and a retry limit
There are five settings. The first three prevent the loop; the last two limit the damage.

Narrow the trigger and leave a mark
Add a condition to the trigger: ‘only when this field changes’, ‘only when a person made the change’. Leave a mark on the record the workflow writes: an ‘updated by automation’ field or label. Have the trigger skip anything that carries the mark. A mark and a condition cut self-triggering off at the root. Both are ordinary options on most automation platforms and take minutes to set. 🏷️
Once per record
Have the workflow run only once for the same record within a set period. If a second request arrives with the same identifier, it is skipped. This setting also breaks the circle where two workflows trigger each other, because on the second turn the record has already been handled. Remembering what has been processed is the simplest kind of lock.
A rate limit and a retry limit
Put an hourly run ceiling on the workflow: a few times the usual busy level. Limit retries to three and lengthen the wait between attempts. OWASP likewise lists rate limiting, timeouts and throttling among the measures against unbounded consumption. A ceiling does not prevent a loop; it limits what the loop costs. With a ceiling in place the worst night has a known price. 🚧
How is a loop caught once it starts?
BU BÖLÜMÜN ÖZETİ
- A run-count alert
- A daily budget ceiling
- A stop button
Prevention does not hold every time. The second line of defence is an alert.
A run-count alert
If a workflow has run more than three times its usual number in an hour, a notification should go out. A token alert works too; but the run count gives earlier warning and is a ready-made setting on most platforms. The meter should report a loop, not the bill. Send the alert to a channel that someone actually reads at night, not to a shared inbox. 🔔
A daily budget ceiling
Set a daily or monthly spending ceiling on the provider side. When the ceiling is reached the calls stop. That means the work stops too; but it is better than a loop that runs through the night. The ceiling decides how bad the worst day can be. Put it at a few times an ordinary day, so that a busy day passes and a runaway one does not.
A stop button
Write down how each workflow is stopped and who can do it. At least two people should be able to switch a workflow off when an alert arrives at night. Anthropic’s guide to building agents also notes that it is common to include stopping conditions in order to maintain control. A workflow you cannot stop is not yours. The wider question of retiring a workflow is taken up in when to shut down a workflow, and the whole framework is in the AI audit guide. 🛑
What do you ask when building a new workflow?
BU BÖLÜMÜN ÖZETİ
- Three questions
- A workflow map
- Meter: the automation loop
The cheapest moment to prevent a loop is the five minutes in which the workflow is built.

Three questions
Does this workflow change the thing it watches? Is there another workflow watching the thing this one writes? What happens if a step fails permanently? If the answer to any of the three is ‘yes’ or ‘I do not know’, the workflow is not switched on until the settings above are in place. Three questions cover the three kinds of loop. ❓
A workflow map
Keep a single table of which workflow watches what and writes to what. Two workflows that trigger each other are visible only in that table. If the table is under ten rows it fits on one sheet of paper. A map puts workflows with different owners side by side. The same table helps when granting an agent permissions; OWASP defines excessive agency as a risk in its own right.
Meter: the automation loop
This article’s meter is a single number: the ratio of a workflow’s highest hourly run count to its usual hour. Where to read it: in the platform’s run history, look at the hourly counts for the last thirty days and divide the highest hour by a usual hour. If the ratio is above ten, read what happened in that hour. Whether a job should go to an agent or to a fixed workflow at all is weighed in agent or fixed workflow. Forecast: automation platforms will put a default run ceiling on workflows that contain a model call. Update log. 3 December 2026: first publication. Forecasts on this page are re-read when they fall due; one that proves wrong is corrected here, not deleted.
How does Adapte Digital look at loop risk?
BU BÖLÜMÜN ÖZETİ
- A single delivery package
- What is reviewed
- Where to start
In the Efficiency File every workflow is written onto a single map and the three questions are asked of each one.
A single delivery package
Adapte Digital does not charge a monthly management fee. Work starts with a single delivery package whose scope is written down in advance: 36,000 TRY + VAT. If the work grows, the new need is defined as a separate add-on package, priced by what will be delivered rather than by the hours spent. 📦
What is reviewed
Trigger conditions, what each workflow watches and writes, retry settings, run ceilings and alerts are examined.
Where to start
Our current packages and capacity are listed on our campaign pages; scope and price are written there before any work starts. 🧭
Quick Summary
- An automation loop is a workflow re-triggered by its own output.
- It has three kinds: self-triggering, mutual triggering and a retry storm.
- A condition, a mark and a once-per-record rule prevent it; ceilings limit the damage.
- A run-count alert reports a loop before the bill does.
- Three questions are asked of each new workflow, and workflows are kept on one map.
Short Glossary
- Trigger
- A trigger is the event that starts a workflow.
- Retry
- A retry is a workflow running a step again after it has returned an error.
- Rate limit
- A rate limit is the largest number of times a workflow may run within a set period.
Frequently Asked Questions
Next Step
Count your workflows that contain a model call and write one thing next to each: is there an hourly run ceiling? If not, set one today.
Sources: OWASP Gen AI Security Project — LLM10:2025 Unbounded Consumption · Anthropic — Building effective agents · OWASP Gen AI Security Project — LLM06:2025 Excessive Agency
Updated: November 2026
Sık Sorulan Sorular
A workflow is set to ‘run when the record is updated’, and it updates the record itself. The update fires the trigger again; the workflow runs again; the record is updated again. Nobody has made a mistake; two correct settings have met and formed a circle. A loop is the sum of two innocent settings. That is why it survives review: each setting, looked at alone, is exactly what was intended. ⭕
In an ordinary automation a loop only clutters records. In a workflow with a model call inside it, every turn spends tokens. If the workflow turns several times a minute, thousands of calls pile up by morning. OWASP, in the risk list it maintains for large language model applications, treats unbounded consumption as a heading of its own. Where there is no limit there is no ceiling either. The agent’s inner exit rule is a separate matter, covered in what a stop condition is.
A loop produces no error; every turn ends in success. No failure notice arrives and the dashboard stays green. Most teams learn of a loop from the bill, or from a customer who says they received the same email forty times. Work that repeats successfully is the quietest fault there is. Monitoring built to catch failures will not catch it, because nothing has failed. 🔕
Some do, some do not, and most look only at a circle inside one workflow. Set your own ceiling as well.
Put the ceiling at a few times the usual busy level. If a busy day hits it, you raise it knowingly.
Stop the workflow first, then look for the cause. Do not switch it back on until the cause is found.
