Yesterday's Trend Watch looked at what overseers are shown. Today's theme is when a run ends. For a long time, many agent runs ended when a request limit, a token budget or a timeout ran out. Several sources dated October 22 to 28, 2026 treat stopping as a decision in its own right.
Stop when the agent is stuck
Pydantic AI 2.63.0, released October 28, adds DetectLoops. Its pull request describes an agent that repeats the same call and gets the same error "until its request or token limit runs out", and says "Nothing in core or harness notices." The new capability notices repeated calls, repeated results, alternation and repeated text, and either nudges the model or ends the run with an error.
Stop when the error will not change
Codex 0.165.0 now treats a provider's "model not found" error as a final failure instead of retrying it (#56445). Pydantic AI 2.62.0 added ModelNotFoundError and related categories. On October 26, Claude Code 2.1.311 stopped retrying requests the API had marked not to retry, which this digest covered yesterday. In each case a retry loop was hiding a permanent error and holding the run open.
Stay stopped after an interrupt
Codex also fixed a pending wake that could outlive an interrupt or a switch to Plan mode, so that later agent messages restarted automatic work (#56330). Interrupted wakes are now marked stopped. A human's stop is now a state that later messages cannot override.
But do not restart on a hunch
The research adds a caution. In 147,002 coding-agent traces (arXiv 2610.35971), early signals could not tell which attempt at a given task would fail, and continuing beat restarting in 216 of 224 budget configurations. A second paper (arXiv 2610.36544) shows that a 90%-accurate restart monitor can lose five points or gain 35, depending on the replacement attempt's chances. A good-looking monitor accuracy figure does not show that restarting helps.
What remains uncertain. The loop thresholds are framework defaults, not measured optima. The restart studies cover coding agents on public benchmarks with fixed budgets, and other agent types may behave differently.
Analysis: Stop rules are worth treating as a small policy with three parts. First, end runs on evidence that nothing will change: an identical call and result repeated, or an error class that is permanent. Second, make a human interrupt final until a person resumes the run, and test that queued messages, retries and wake-ups cannot undo it. Third, do not restart a run because a monitor thinks it looks bad unless you have measured, on your own tasks, that restarting beats continuing for the same token budget. The cheapest stop is the one that ends a loop. The most expensive is the one that throws away an attempt that would have succeeded.
Sources and evidence
- Add a DetectLoops capability to interrupt repeated-action loops (pydantic-ai #11471)
- Pydantic AI v2.62.0 release notes (GitHub, October 27)
- Codex rust-v0.165.0 release notes (GitHub, October 27)
- Make agent-message wakes respect interrupts and Plan mode (codex #56330)
- Claude Code v2.1.311 release notes (GitHub, October 26)
- Continue or Restart? The Limits of Early Failure Prediction in Coding Agents (arXiv 2610.35971)
- Monitor Accuracy Isn't the Answer: A Decision-Value Framework for Evaluating AI Agent Restart Monitors (arXiv 2610.36544)
Sources from October 22 to 28 treat ending an agent run as a design choice: Pydantic AI's DetectLoops interrupts repeated-action loops, Codex and Pydantic AI make model-not-found errors final, and Codex stops queued messages from overriding an interrupt; meanwhile two papers find that restarting struggling coding-agent runs rarely beats continuing (216 of 224 configurations favoured continuation).