Protocol

Enforce agent-loop limits outside the model

An agent saying it will stop is not an enforced limit. Put the stop controls in the software running the agent, and distinguish a completed task from a run that used its budget.

About 2 min read

Before you use it

Use when
  • An agent can iterate until it believes the task is complete.

Keep this limit in mind

  • Bounds can stop useful work early; choose them from task stakes and expected horizon, then tune with observed trajectories.

Current editorial reading

Choose what each limit controls

Before starting, set an iteration limit and the time or spending limits the task needs. Stop starting new work when any required limit is reached. A counter alone does not bound the time spent waiting inside one tool call: configure connection and request timeouts too. Record which limit ended the run, unfinished work and any external operation whose outcome is still unknown.

Test a run that cannot finish

In a safe test, make the completion check always return false, then make a tool stall. Confirm that control returns within the configured limits and that the result is labelled incomplete. For example, a search limit of 20 calls must not be reported as successful coverage. Microsoft recommends bounded loops; AWS explains timeout coverage and the risks of setting timeouts too short. Choose values from the task and service behavior, not a universal number.

Take it with you

A budget stop limits further work; it does not establish success or prove that an external operation was canceled. Resolve uncertain outcomes before resuming.

Sources and evidence (2)

What we checked

Supports

Microsoft recommends bounding autonomous agent loops because the completion mechanism may not terminate.

Official experimental framework documentation, updated 2026-08-25. Selected substantive passages read on 2026-10-04. Runtime enforcement and the failure-injection check are editorial operational advice.

Agent looping · Introduction; Set up looping manually; Control context, progress, and output

Limits

A timeout may omit parts of a remote operation; a timeout also does not establish that side effects did not occur.

Selected full-text passages read. The document has a 2019 copyright notice; an exact publication date was not established. This limits claims that an iteration cap alone bounds elapsed time or that stopping a caller cancels remote work.

Timeouts, retries, and backoff with jitter · PDF pp. 2–3, Failures Happen and Timeouts

Editorial sources (2)

Editorial version 1.0.0 · Evidence checked 2026-10-04

Save and practise this idea

My learning

Read. Recall. Repeat.

Save this idea and return to it on any device.

Use email
Keep exploring

Connected ideas

You are readingEnforce agent-loop limits outside the model

Original edition evidence and sources

These records belong to the original released edition. The current editorial reading has its own evidence above; neither set silently replaces the other.

Supports

Microsoft's agent-loop documentation explicitly recommends always bounding autonomous loops because completion conditions can fail and agents can stall.

Bounds can stop useful work early; choose them from task stakes and expected horizon, then tune with observed trajectories.

Agent Looping · See source record

All sources (1)
Original edition, downloads and provenance

The reading above is editorial version 1.0.0, bound to this exact source edition. The original data and saved downloads retain that edition and the separate editorial layer. They may contain earlier wording; use the current reading above when interpreting it.

Version 0.1.0

No review details are supplied for this edition.

Read the original edition and overlay as JSON · Release details