Self-improving agents repeat actions when they cannot distinguish progress from another attempt, when a model keeps selecting an easy cyclic action, or when workflow and tool feedback creates an unbounded path. The reliable fix is layered: trace the exact cycle, impose hard execution limits, detect unchanged external state, verify completion independently, and evaluate any learning change on repeatable tasks.
A model that repeats text and an agent that repeatedly clicks, calls an API, or hands work to another agent may look similar in a log, but they are different failures. Temperature changes may affect model sampling; they cannot replace runtime safeguards, state verification, or a diagnosed recovery strategy.
As an Amazon Associate I earn from qualifying purchases.
What counts as a repeating-action failure?
There are two useful levels of analysis. At the model level, the reasoning model emits a recurring sequence of thoughts, actions, or tool choices because a progress-making action is difficult to learn or because errors remain correlated across successive steps. At the system level, the agent runtime repeatedly invokes models, tools, workflow transitions, or handoffs without an effective stopping condition.
Quick wins for a faster PC:
Scan for outdated or missing drivers - takes under a minuteDriver Scan →Clear out junk files and repair common Windows errorsFree Scan →System repetition can continue even when application code contains no obvious infinite while loop. Framework semantics, stale observations, a tool that returns an unchanged result, a handoff that routes back to its caller, or a termination check that never becomes true can close the feedback path. The consequences include wasted tokens and compute, growing context, service denial, duplicate external side effects, and a run that never reports a meaningful outcome.
#1 Best Overall
Repetition is not automatically a bug. A deployment workflow may legitimately poll until a job finishes, an inventory agent may reread a page after a transient error, and a robot may retry a grasp. The question is whether the repeated action changes the relevant state within a bounded number of attempts.
Five causes behind the loop
1. A reasoning model prefers an easy cycle
The 2026 PMLR paper Wait, Wait, Wait… Why Do Reasoning Models Loop? reports that text loops were common at low temperature in its studied models. Larger models looped less often in that set, while distilled students sometimes looped even when their teacher models rarely did. The authors propose that a model may favor an easy cyclic action when the correct progress-making action is harder to learn. Temporally correlated errors can then make the same few actions recur.
Increasing temperature can add exploration and reduce looping in the paper’s setting, but it does not repair a learning error. It can also make an answer longer or less predictable. Treat temperature as an experiment for model-output repetition, not as a complete fix for a tool-use or workflow loop.
Recommended Free Tools
2. An unbounded feedback path crosses components
The 2026 IAL-Scan paper defines an Infinite Agentic Loop as a failure in which agent logic, framework behavior, runtime observations, and termination mechanisms combine to repeat model calls, tools, transitions, or handoffs without an effective bound. Its scan of 6,549 LLM-agent repositories produced 74 potential findings; manual review confirmed 68 infinite-loop failures across 47 projects, a reported precision of 91.9%. Those figures describe that repository scan and review, not the prevalence of loops in all deployed systems.
Typical paths include a planner calling a tool, the tool returning an observation that causes the planner to request the same call, or agent A handing to agent B, which hands back to A. A guardrail can also re-prompt a model indefinitely if every repair attempt returns the same invalid output.
3. The agent mistakes its own story for progress
Self-evaluation is vulnerable when the agent is both actor and judge. In one controlled long-running-loop study, the agent claimed improvement in all 54 cycles, yet 56% of cycles had a measured change of zero or below. The study used a world-state oracle outside the agent. The result does not imply that every agent misreports progress at that rate; it shows why a confident progress statement is not an adequate completion test.
Rank #2
4. Observations or tools do not reflect the real state
A loop can be caused by a stale page, a cached API response, a failed write that is reported as success, or a tool whose arguments are normalized differently than the agent expects. If the agent cannot observe the state change it just made, it may repeat the same operation. Conversely, a tool may apply a side effect twice while returning an unchanged observation, creating both duplication and apparent stagnation.
5. Stored lessons are present but not applied
A memory entry is not evidence that a self-improving system learned. A 2026 PMLR study found that agents consistently relied on raw experience but often disregarded or misinterpreted condensed experience, even when the condensed material was their only supplied experience. The authors discuss limits in the semantics of compressed content, processing biases, and tasks where pretrained knowledge already suffices. The practical test is behavioral: present a later, relevant task and check whether the stored lesson changes the decision and improves an independently measured outcome.
Diagnose the exact cycle before changing the model
Use a trace that records each decision and its effect. OpenAI’s official agent-evaluation guidance describes traces as records of model calls, tools, guardrails, and handoffs; they let you locate repetition in planning, tool selection, a handoff, or a guardrail rather than guessing from the final transcript.
- Capture one failing run end to end. Record a run identifier, timestamps, model call, selected action, normalized tool arguments, returned observation, workflow node, handoff target, retry count, and externally visible state.
- Find the shortest repeated segment. Compare consecutive action and observation tuples. A loop may be two calls alternating, a longer cycle through several agents, or one call repeated with different irrelevant arguments.
- Classify the layer. Decide whether the repeated output originates in model choice, observation freshness, tool behavior, workflow control flow, or a termination check. More than one layer can be responsible.
- Check external state. Query the system of record, a task-specific test, or another observer. Do not rely only on the agent’s claim that a file, record, page, or physical object changed.
- Reproduce with the same inputs. Keep the task, model version, tools, and evaluation criteria stable enough to determine whether a proposed change actually alters the failure.
- Apply one targeted change. Examples include a turn cap, a fresh-read requirement, a distinct recovery branch, an idempotency key, or a revised completion predicate. Changing several layers at once hides the cause.
- Retest both the failure and legitimate repetitions. A guard that stops the bad loop but interrupts normal polling is not a finished fix.
Contain every run with explicit budgets
A bound is the first safety mechanism because diagnosis is impossible if a run can consume resources indefinitely. Set limits appropriate to the task and report budget exhaustion as a separate terminal status.
| Budget or control | What it limits | What to record |
|---|---|---|
| Maximum turns or model calls | Planner and tool cycles | Configured cap, calls used, and the final status |
| Token budget | Context growth and generation cost | Input and output tokens, truncation behavior |
| Time limit | Wall-clock occupation and hung tools | Start time, deadline, timed-out component |
| Finite retry policy | Transient-error retries | Retry count, delay, and whether arguments changed |
| Side-effect quota | Writes, payments, messages, device commands, or other costly actions | Operation type, authorization, and idempotency key |
OpenAI’s Agents SDK documentation uses a MaxTurnsExceeded exception when a run exceeds its configured maximum turns. Handle that condition explicitly: mark the run as budget_exhausted, preserve the trace, and avoid presenting it as success. A bound contains runaway execution; it does not explain why the loop occurred or guarantee task completion.
The Tool Desk
Outbyte PC Repair FREERepair Windows errors before they cause bigger problemsFix Now →Outbyte Driver Updater FREEScan for outdated or missing drivers - takes under a minuteDriver Scan →Use separate budgets for safe reads and side-effecting writes when possible. Require confirmation or a higher-level policy check before an agent repeats an irreversible operation. A retry should be considered safe only when the operation is idempotent or protected by a request key that prevents duplicate effects.
Detect repetition and no progress
Build a normalized fingerprint for each step. Include the tool or workflow node, canonicalized arguments, the relevant observation, and a compact representation of the state that should change. Normalization prevents superficial differences—such as dictionary order, whitespace, or volatile timestamps—from hiding a repeated action.
Then compare the fingerprint with the resulting external state. A repeated fingerprint with no meaningful state delta is a strong stop or recovery signal. A repeated tool call that changes state may be legitimate, so the detector must be calibrated to the workload rather than treating every duplicate call as failure.
Useful no-progress predicates
- The same action and relevant observation recur n times without a state change.
- A measured task score fails to improve for a fixed window.
- The workflow returns to the same node with the same guard conditions.
- A tool reports success but an independent read shows the pre-action state.
- The agent proposes the same recovery strategy after a classified failure.
Choose thresholds from labeled traces. A polling task may need several identical reads; a payment or deletion operation may justify stopping after the first ambiguous result. Log why the detector fired so operators can distinguish a real loop from an intentionally repetitive procedure.
Verify completion outside the agent’s self-report
Define a postcondition before the run starts. Depending on the task, that can be a record with an expected value, a file that passes a test, a deployment health check, a separate evaluator’s rubric, or a physical state measured by a sensor. The postcondition should be specific enough that a plausible-sounding explanation cannot satisfy it.
For computer-use trajectory grading, Microsoft Research recommends specific, non-overlapping rubric criteria and separating process from outcome. Its reported Universal Verifier had a near-zero false-positive rate on the cited benchmarks, compared with at least 45% for WebVoyager and at least 22% for WebJudge. Those are benchmark results with the labels reported by Microsoft Research, not a guarantee for every evaluator or agent.
Keep process evidence and outcome evidence separate. A trajectory may follow a permitted sequence yet fail to produce the requested state; another may reach the state through an unexpected but valid path. If an LLM grader is used, test it against adversarially plausible traces and retain deterministic checks where available.
Recover according to the diagnosed failure
When model choice is cyclic
Prompt the model with the current state, the failed action, and the allowed alternatives rather than merely asking it to try again. Require a changed plan or a reasoned stop after a repeated fingerprint. Temperature can be compared in a controlled evaluation, but keep the same completion test and budget so a longer answer is not mistaken for progress.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
When observations are stale or ambiguous
Force a fresh read after a write, include version or timestamp information, and return explicit failure when a tool cannot verify its side effect. If a read is cached by design, expose the cache age to the agent. For operations that can be retried, use idempotency keys and reconcile the external state before issuing another write.
When workflow control flow cycles
Draw the transition graph and mark every edge that can return to an earlier node. Add a maximum visit count or a progress predicate to each cycle. Handoffs should carry a reason and a bounded hop count; a receiving agent should be able to reject a handoff that contains no new information.
When a side effect is risky
Stop and report uncertainty, request human approval, or switch to a read-only diagnostic mode. Do not allow a repetition detector to be the only protection around money movement, deletion, external messaging, or physical actuation.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Turn failures into auditable learning
A self-improvement loop should preserve the failed trajectory, classify the failure, propose a targeted change, and evaluate that change against a verifiable result. The change might be an inference-time instruction, a tool wrapper, a state representation, or a policy patch. Keep the original trace so later improvements can be compared with the same failure.
Outdated Drivers Are Slowing You Down
One free scan finds every outdated or missing driver and matches the right update for your exact hardware.Free scan · exact hardware matchPC Slower Than It Used to Be?
A free scan shows the junk files, broken settings and background clutter dragging Windows down - then fixes them in one click.Free scan · Windows 10 & 11A 2026 computer-use study used this failure-driven approach: an LLM diagnosed failure modes, proposed inference-time solutions, and generated code patches that received light human checking. In its stated setup, OpenCUA-72B’s OSWorld success rose from 42.3% to 48.9%, a gain of 6.6 percentage points without additional training cost. This is a result for that model, benchmark, and procedure, not a promised improvement for other agents.
Best Value
For physical agents, NVIDIA, Carnegie Mellon University, and the University of California, Berkeley describe ENPIRE as a repeatable cycle of reset, execution, outcome verification, policy refinement, rollout records, and hypothesis comparison. Its page reports 99% pass@8 on showcased dexterous-manipulation tasks; pass@8 means up to eight in-context retries conditioned on previous failures within a long-horizon rollout. The result is specific to those tasks and setup. As the project page puts it: "Before an agent can improve a robot policy, the task must become self-resetting and self-verifying."
Make memory an experimentally testable component
Separate raw trajectories, condensed lessons, retrieved context, and the decision that follows retrieval. For each stored lesson, log whether it was selected, how it was interpreted, and which action it changed. A memory system that grows while decisions remain identical is accumulating text, not demonstrating learning.
Evaluate memory on held-out tasks that require the lesson. Compare a baseline with no lesson, the raw experience, and the condensed version. Measure both outcome and failure mode: a lesson may improve one task while causing overgeneralization elsewhere. Retain examples where the agent ignored or misread the lesson; they are essential for improving retrieval and compression.
Do these 3 things before closing this tab:
1Repair Windows errors before they cause bigger problems2Fix the driver behind crashes, sound loss and screen glitches3Clear out junk files and repair common Windows errorsEvaluate fixes with traces and repeatable cases
Use traces to debug individual runs, then use a stable dataset and evaluation run to compare versions. Keep task instructions, tool contracts, outcome criteria, and budget settings fixed while changing one intervention. Review representative failures in addition to aggregate success, because a lower loop rate can conceal more dangerous side effects or premature stops.
| Evaluation question | Evidence to collect |
|---|---|
| Did the loop stop? | Cycle length, detector reason, final status, and remaining budget |
| Did the task complete? | Independent postcondition or external state check |
| Did the fix generalize? | Held-out tasks and varied but legitimate repetition patterns |
| Did risk decrease? | Duplicate side effects, failed writes, escalation rate, and cost |
| Did learning transfer? | Later decisions with and without the stored lesson |
Compare fixes on five axes: detection layer, containment, verification quality, recovery behavior, and evidence quality. There is no single best configuration for every task. A deterministic postcondition may be ideal for a database update, while a human review or independent evaluator may be necessary for an open-ended computer-use task.
A practical reference architecture
The following control flow keeps the agent’s proposal separate from execution and verification:
while budget.allows_next_step():
proposal = agent.plan(state, memory)
fingerprint = normalize(proposal, state.observation)
if repetition_detector.seen_without_progress(fingerprint, state.external):
return stop('no_progress', trace)
result = guarded_executor.run(proposal)
trace.record(proposal, result)
state = independent_reader.refresh()
if verifier.postcondition_holds(state):
return success(trace)
if result.is_irreversible_failure or policy.requires_human(result):
return escalate(trace)
return stop('budget_exhausted', trace)
This pattern is intentionally conservative. The executor enforces tool permissions and idempotency; the independent reader refreshes state; the verifier decides success; and the controller reports no progress, escalation, and budget exhaustion distinctly.
Free tools Windows power users keep installed
One-click scans. No signup required.
Implementation checklist
- Can you identify the shortest repeated action-and-observation cycle in a trace?
- Are model calls, tool calls, handoffs, retries, tokens, time, and side effects bounded?
- Does every run end as success, failure, escalation, or budget exhaustion rather than an ambiguous timeout?
- Does the repetition detector compare resulting external state, not just identical text?
- Are legitimate polling and retry patterns covered by tests?
- Is completion checked by a task-specific postcondition or independent evaluator?
- Are failed trajectories retained with a classified cause and a proposed change?
- Does a stored lesson demonstrably alter later decisions on relevant held-out tasks?
- Are model, tool, workflow, and guardrail changes evaluated separately where possible?
- For physical systems, can the environment reset itself and verify the outcome before another attempt?
Bottom line
Repeating actions are a symptom, not a diagnosis. Model-level cyclic behavior, stale observations, ignored memory, and unbounded workflow feedback require different interventions. Trace the path first; then cap execution, detect no-progress state, verify the real outcome independently, and learn only from changes that survive repeatable evaluation. Those controls stop a loop from becoming an outage while preserving the retries that genuinely move a task forward.
Quick Recap
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

