agentsop-bounded-loop

Community

Prevent infinite agent loops with hard bounds

Authoragentsope
Version1.0.0
Installs0

System Documentation

What problem does it solve?

It stops language-model-driven agent workflows from running forever when the loop logic lacks an explicit termination mechanism, causing runaway cost, rate-limits, and unusable failures.

Core Features & Use Cases

  • Explicit termination contract: enforces a counter budget plus a checkable exit predicate that is outside the LM’s control.
  • Progress witness + stagnation detection: requires each loop iteration to change state in a measurable way, and fast-fails when the same error or output repeats.
  • Graceful escalation path: routes to an outer/human fallback with preserved state instead of crashing or endlessly retrying.

Use cases: bounding cyclic agent pipelines like tool-call→reflect→retry, plan→act→observe, optimizer/evaluator sweeps, code self-fix cycles, and multi-agent handoffs/supervisor patterns where delegation can create ping-pong loops.

Quick Start

Activate this skill when your agent hits a framework loop-depth/max-iteration error or shows repeated retries without improvement, and then refactor your workflow to add an iteration counter, progress witness, stagnation exit, and an escalation branch that preserves state.

Dependency Matrix

Required Modules

None required

Components

references

💻 Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: agentsop-bounded-loop
Download link: https://github.com/agentsope/SkillAlchemy/archive/main.zip#agentsop-bounded-loop

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.